@iOSXCUITFindBy is not working,the same code is running using driver.findBy

0

I automating iOS app on windows using Appium studio. When I am using below its working fine, but when I am using pagefactory annotations.

 driver.findElement(By.xpath("//*[@class='UIAButton'][2]")).click();

 @iOSXCUITFindBy(xpath="//*[@class='UIAButton'][2]")
 MobileElement contactButton;

It is not able to find the xpath. how can I make it work ?

@Pooja0907 we can help you in pure Appium. For Android Studio ask here -> https://appium.experitest.com/

1 Like

even if your using @iOSFindBy(id=“Bla Bla”) ?

Thank you @Aleksei for the guides.

Then also its not working.