From a7a95616545d1a7a0ff95970c09d1ea04ba000eb Mon Sep 17 00:00:00 2001 From: hushenggang Date: Mon, 29 Aug 2016 16:58:54 +0800 Subject: [PATCH] iOS driver dose not support to find element by name --- Appium/Inspector/AppiumInspector.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Appium/Inspector/AppiumInspector.m b/Appium/Inspector/AppiumInspector.m index 80cf2c82..9b779354 100644 --- a/Appium/Inspector/AppiumInspector.m +++ b/Appium/Inspector/AppiumInspector.m @@ -285,7 +285,7 @@ -(BOOL) selectedNodeNameIsUniqueInTree:(WebDriverElementNode*)node -(AppiumCodeMakerLocator*) locatorForSelectedNode { NSString *xPath = [self xPathForSelectedNode]; - if ([self selectedNodeNameIsUniqueInTree:_rootNode]) + if (!self.model.isIOS && [self selectedNodeNameIsUniqueInTree:_rootNode]) { return [[AppiumCodeMakerLocator alloc] initWithLocatorType:APPIUM_CODE_MAKER_LOCATOR_TYPE_NAME locatorString:_selection.name xPath:xPath]; }