mirror of
https://github.com/appium/appium.git
synced 2026-02-09 11:18:51 -06:00
Fix the bug with corrupted search context value "ctx" while during xpath search
avoiding bad syntax in case of context is empty string
This commit is contained in:
@@ -40,6 +40,7 @@ iOSController.createGetElementCommand = function (strategy, selector, ctx,
|
||||
many) {
|
||||
var ext = many ? 's' : '';
|
||||
var command = "";
|
||||
ctx = !ctx ? ctx : ", '" + ctx + "'" ;
|
||||
switch (strategy) {
|
||||
case "name":
|
||||
helpers.logDeprecationWarning("Locator Strategy", '"name"',
|
||||
@@ -82,7 +83,6 @@ iOSController.findUIElementOrElements = function (strategy, selector, ctx, many,
|
||||
ctx = '';
|
||||
} else if (typeof ctx === "string") {
|
||||
ctx = escapeSpecialChars(ctx, "'");
|
||||
ctx = ", '" + ctx + "'";
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user