Hey! So I’m a relatively new Appium user, so please excuse me if this question seems a little basic.
My company has a hybrid application which uses webiews in several places, and I am currently in the middle of writing test scripts for this application in Ruby using Appium. I’ve been stuck for a while, because I reach a page where I need to search for elements inside a webview and click on them. So far, I’ve managed to switch contexts to the webview using
set_context context_array.last
and I know that the context switch is successful, because I then output my current context to the terminal, and it correctly outputs that I’m in the webview. I then used Safari to inspect the elements in my webview, and saw the following HTML code:
I followed the xlink and found the following lines of code:
`
So in my Appium script, I’ve tried to locate the element using the following, which so far haven’t worked.
wait { xpath('//symbol[@id="icon-eat"]') }
wait { id("icon-eat") }
Any advice on how to proceed? My capabilities are:
options = { caps: { platformName: 'iOS', platformVersion: '10.3', deviceName: 'iPhone 7', app: APP_PATH, automationName: "XCUITest", browserName: "iOS", startIWDP: true, nativeWebTap: true }, launchTimeout: 20000 }
An Appium log is attached. I’ve replaced the company name and other sensitive details for security purposes.
Appium Logs.txt (54.8 KB)