Element: <XCUIElementTypeOther type="XCUIElementTypeOther" name="main" label="main" enabled="true" visible="true" accessible="false" x="0" y="118" width="390" height="272" index="2">
<XCUIElementTypeOther type="XCUIElementTypeOther" name="Select Provider" label="Select Provider" enabled="true" visible="true" accessible="false" x="16" y="147" width="1" height="2" index="0">
<XCUIElementTypeStaticText type="XCUIElementTypeStaticText" value="Select Provider" name="Select Provider" label="Select Provider" enabled="true" visible="true" accessible="true" x="16" y="147" width="60" height="41" index="0"/>
</XCUIElementTypeOther>
<XCUIElementTypeStaticText type="XCUIElementTypeStaticText" value="Select Provider" name="Select Provider" label="Select Provider" enabled="true" visible="false" accessible="true" x="148" y="167" width="118" height="21" index="1"/>
<XCUIElementTypeOther type="XCUIElementTypeOther" value="Select Provider" enabled="true" visible="true" accessible="true" x="17" y="156" width="356" height="43" index="2"/>
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="true" accessible="false" x="16" y="220" width="358" height="27" index="3">
<XCUIElementTypeOther type="XCUIElementTypeOther" name="Select Location" label="Select Location" enabled="true" visible="true" accessible="false" x="16" y="233" width="1" height="2" index="0">
<XCUIElementTypeStaticText type="XCUIElementTypeStaticText" value="Select Location" name="Select Location" label="Select Location" enabled="true" visible="true" accessible="true" x="16" y="233" width="61" height="41" index="0"/>
</XCUIElementTypeOther>
</XCUIElementTypeOther>
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="true" accessible="false" x="160" y="332" width="70" height="13" index="4">
<XCUIElementTypeStaticText type="XCUIElementTypeStaticText" value="Continue" name="Continue" label="Continue" enabled="true" visible="true" accessible="true" x="176" y="331" width="38" height="13" index="0"/>
</XCUIElementTypeOther>
Script:
@Test
public void TestScreen_2() {
WebDriverWait waitProfile = new WebDriverWait(driver, Duration.ofSeconds(40));
WebElement selectProvider1 = waitProfile.until(ExpectedConditions.elementToBeClickable(By.xpath("//XCUIElementTypeStaticText[@value=‘Select Provider’]")));
assertThat(selectProvider1.isEnabled(), is(true));
log.info(driver.getPageSource());
selectProvider1.click();
}
I can see the click is not working as expected.