I am building a test automation system on iOS and I am having issues when trying to click on element which is : XCUIElementTypeStaticText.
Info about my system:
- using Appium desktop 1.17.1
- iOS 13.6.1
- iphone 7
- code in Java
- framework cucumber and testNG
Here is my xpath for the element I want to click on:
/XCUIElementTypeStaticText[@name=“Continue with Email”]
There is also an accessibility id = Continue with Email
I cannot manage to click on this button.
So far what I tried and did not work:
- using the xpath —> not working, I cannot click
- using this solution that I found on the appium forum:
MobileElement mobileElement = (MobileElement) platform.getIosDriver().findElement(MobileBy.iOSNsPredicateString(“type == ‘XCUIElementTypeStaticText’ AND name == '” + “Continue with Email” + “’ AND visible == 1”))
When I am running:
System.out.println(platform.getIosDriver().getPageSource()); for all the page here is the result I am getting from this part of the app…This element is inside a Button element which has no accessiblity id.
Is it possible to have some advice or help?
If this element type (XCUIElementTypeStaticText ) cant be clicked I can ask the developers to put an accessibility id for the button.
thanks a lot for the help and advice !