This site is in read only mode. Please continue to browse, but replying, likes, and other actions are disabled for now.
3 / 3
Feb 2019

My code -
public class HomePage {

Data data;
String dataFile;
public IOSDriver<IOSElement> driver;

public HomePage(IOSDriver<IOSElement> driver, String dataFile) throws JsonParseException, JsonMappingException, IOException, InterruptedException {
	this.data = Data.get(dataFile);
	this.dataFile=dataFile;
	this.driver=driver;
	PageFactory.initElements(new AppiumFieldDecorator(driver), this);
}

Tried with accessibility -
@iOSXCUITFindBy (accessibility = “Jio Welcome Polys”)
private IOSElement welcomeBanner;

Tried with xpath - 

@iOSXCUITFindBy (xpath = "//XCUIElementTypeImage[@name='Jio Welcome Polys']")	
private IOSElement welcomeBanner;

Assert.assertTrue(welcomeBanner.isDisplayed());

None of the annotations work ^^ -
Error thrown - Can’t locate an element by this strategy: By.chained({By.AccessibilityId:
java-client : 7.0.0

It works when i use -
driver.findElementByXPath("//XCUIElementTypeImage[@name=‘Jio Welcome Polys’]").isDisplayed();

  • created

    Feb '19
  • last reply

    Feb '19
  • 2

    replies

  • 439

    views

  • 3

    users

  • 1

    link