Imposible to click on XCUIElementTypeStaticText element in iOS


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:

  1. using javascript executor --> not working, impossible to click
  2. using the xpath —> not working, I cannot click
  3. 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 !

1 Like

Have u resolved the issue ?

If not , can you share the appium inspector screen shot by pointing out the element you are tryign to perform click operation.

Have you tried with touch actions ? Is the property clickable is true or false for this XCUIElementTypeStaticText ?

Thanks for answering.
So far no I have not fixed it…I tried touch action, I tried tap…I tried a lot of things so far :-)>
I am wondering If I should not just ask the developers to put an accessibility id into the Button Element…if they put an accessibility id in the Button then I could be able to interact with it:


Attached is one of the screenshot for appium inspector ( and visible = false).

Thanks in advance for the help and advice!

Try this similar to your problem:

Make sure you are using compatiible versions of XCode and iOS OS.

I already tried to apply some of the solution described in the case but it did not work.
What do you mean by a compatibility between XCode and iOS OS? I am not using XCode…I just used it to install WebDriverAgent on the phone.
Is it the issue? I am new to iOS automation so maybe I am missing some things here.

Thanks for all the help and support,

When i faced a similar issue related to perform click action my issue was fixed using latest versions of Xcode to install WDA and iOS OS. In ur case iOS 13.6.1is latest OS so i adviced you to use latest version of Xcode as well.

If nothing works ask dev to make visible property to true and give a try once.

ok! thanks a lot for all the advice! Dvorah

Make sure that clickable area of the button is overlapping the element. I find that sometimes I need to center click elements to get them to proc the trigger.
def tap_center_element(ele)
position = ele.get_position
center_x = position[:end_x] / 2
center_y = position[:end_y] / 2$driver).tap(x: center_x, y: center_y).perform

or something