Iframe issue on iOS hybrid application

Hi friends,
Im working on a hybrid app that has an iFrame within the main page. I am not able to access the iFrame on iOS, but Android it works perfectly fine when I switch the context to webview and use xpath locators, by using Selenium.
I have tried on iOS - switched context to webview and tried with same xpath that we do on selenium tests but it did not work. Also tried with native context by identifying with XCUIT accessibility ID but did not work.
Any help would be greatly appreciated! Thanks.

elements on different browsers can have different locations. specially xpath which never recommend to use. check it real location on iOS (better avoid using xpath. use e.g. css) and apply it.

thanks @Aleksei. this is for an webview iFrame within an iOS mobile app. same method works on android but does not work on iOS.

On android it works the same way it works on seelenium web (by using xpath)
on iOS it does not work by xpath, or even by using native xcuit locators

1 Like