Hi @Telmo_Cardoso,
Thanks for reply
I am just clicking on the button “Open Setting” in iOS Application and default Wifi setting Screen of iOS is opened which contain list of wifi connection.
After that,
I click on the below element using
xpath : //XCUIElementTypeStaticText[@name=“AccessPointName”]
driver.findElement(By.xpath("//XCUIElementTypeStaticText[@name=“AccessPointName”]")).click()
or
accessibility Id = AccessPointName
driver.findElementByAccessibilityId(“accessPointId”);
but it shows the No Such Element Exception.
I am using iOSInspector.html to find id.
@Telmo_Cardoso Is switching between different native apps supported in appium? I thought it was a not supported[Read somewhere for uiautomation. Not sure about xcuitest]. At-least not between two native applications. If it is between a native and web, yeah it is fine. Please let me know if i am wrong here. I too have many scenarios like this.
Please find the logs of appium server
sing":“accessibility id”,“value”:“EcoNet-DC85DEB14184”}
[debug] [MJSONWP] Calling AppiumDriver.findElement() with args: [“accessibility id”,“EcoNet-DC85DEB14184”,“6963af98-7f5e-49da-a5d5-10f220ea94d3”]
[debug] [XCUITest] Executing command ‘findElement’
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[debug] [BaseDriver] Waiting up to 0 ms for condition
[debug] [JSONWP Proxy] Proxying [POST /element] to [POST http://localhost:8100/session/4E9C5BE5-DDF2-4245-87AF-A855FC297751/element] with body: {“using”:“accessibility id”,“value”:“EcoNet-DC85DEB14184”}
[debug] [JSONWP Proxy] Got response with status 200: {“value”:{“using”:“accessibility id”,“value”:“EcoNet-DC85DEB14184”,“description”:“unable to find an element”},“sessionId”:“4E9C5BE5-DDF2-4245-87AF-A855FC297751”,“status”:7}
[HTTP] <-- POST /wd/hub/session/6963af98-7f5e-49da-a5d5-10f220ea94d3/element 500
I have tried with different api.
accessPointNameAccessId = EcoNet-DC85DEB14184
- driver.findElementByAccessibilityId(locatorIOS.getProperty(“accessPointNameAccessId”));
TouchAction action = new TouchAction(driver);
action.tap(driver.findElementByAccessibilityId(locatorIOS.getProperty(“accessPointNameAccessId”)));
action.perform();
action.release();
driver.tap(1,driver.findElementByAccessibilityId(locatorIOS.getProperty(“accessPointNameAccessId”)),1);
It’s still not working with Wait Statement.
I have used below API.
Tried with different xpath:
txtAccessPoint = //XCUIElementTypeStaticText[contains(@name=“EcoNet-DC85DEB14184”)]
txtAccessPoint = //XCUIElementTypeCell[contains(@label, ‘EcoNet-DC85DEB14184’)]
txtAccessPoint = //XCUIElementTypeCell[contains(@label, “EcoNet-DC85DEB14184”)]
TestBaseUtility.waiForVisibility(locatorIOS.getProperty(“txtAccessPoint”));
TouchAction action = new TouchAction(driver);
action.tap(driver.findElementByAccessibilityId(locatorIOS.getProperty(“accessPointNameAccessId”)));
action.perform();
action.release();
public static void waiForVisibility(String xpath) {
wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(xpath)));
}
Can you please tell me which version of appium are you using ?
can you please help me by providing exact XPATH which you are using.
Please find attached file which contains the logs of appium server.
I am working in debugging mode and while waiting for visibilility of element it is showing the error.debugLogAppium.txt1 (25.5 KB)
Hi @Telmo_Cardoso,
Can you please tell me , Which Xpath or id are you using?
I want to try with that XPATH or id.
I just used your driver.findElementByAccessibilityId… didn’t had time to look at your logs… if you think its a bug open issue with ALL information in https://github.com/appium/appium/issues2
Hi @Telmo_Cardoso,
Which version of appium,xcode and iOS are you using?