diff --git a/WebDriverAgentMac/WebDriverAgentLib/Utilities/FBXPath.m b/WebDriverAgentMac/WebDriverAgentLib/Utilities/FBXPath.m index e2e0990..24c1e96 100644 --- a/WebDriverAgentMac/WebDriverAgentLib/Utilities/FBXPath.m +++ b/WebDriverAgentMac/WebDriverAgentLib/Utilities/FBXPath.m @@ -110,11 +110,10 @@ - (NSString *)fb_toFixedXPathQuery NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:replacePattern options:NSRegularExpressionCaseInsensitive error:nil]; - NSString *result = [regex stringByReplacingMatchesInString:self + return [regex stringByReplacingMatchesInString:self options:0 range:NSMakeRange(0, [self length]) withTemplate:@"$1.$2"]; - return result; } @end