Hi I am trying to access elements in Appium Inspector version 2024.2.2 my system is on Appium version 2.5.1, and XCUItest Driver version 7.1.0.
I am not able to inpect my application when running on webview with simulator version 17, I am able to inpect same url when running it on simulator version 16.4 irrespective of isInspectable property Appium Inspector keeps loading but didnt load anything.
Ok, Iām going to post the problems Iām seeing and comment. Iāll also post some resources for you to follow up on:
Consider adding the āapp:ā capability with a path to your executable. This will make things run smoother and faster.
Consider adding āplatformVersion:ā capability unless you enjoy inconsistent driver behavior (which is what I think you are experiencing).
You donāt really need to declare āudid:ā capability with Simulator. Consider not using this capability.
Consider adding āplatformVersion:ā capability and specifying iOS version that you are testing in this capability. I also note here that with Xcode 15 (according to your log) you should probably not go higher than iOS 17.0. For your reference:
Here is a good tutorial on using the Appium Inspector: https://testgrid.io/blog/appium-inspector-tutorial/
Only thing I would ignore is using the GUI Server, which at this point is obsolete. Otherwise, this is a good reference.
And here is the command reference for Appium Capabilities, in case you have questions about which ones you might need going forward:
Good luck to you. I think with some slight corrections to your configuration you should be able to get things up and running as you would like.
Hi I have updated the capabilities as you suggested with following but no luck, I am still not able to get view hierarchy following are the updated capabitities along with server Logs
Yeah, thatās right. There is a timeout from getting page source, could try to increase that timeout with newCommandTimeout capability. I also saw in that log a build failure with Xcode error 75. Are the two simulators run on the same Mac?
That log is interesting. The timeout seems to not use the value you pass as a timeout capability. Could you try with capability, āwdaConnectionTimeoutā, and pass the value as an integer instead of a string? So:
"appium:wdaConnectionTimeout": 7200 # <- not "7200"
Current error is at 240000ms, so you may need to bump that value up, especially if itās in milliseconds. Iād like to see the value in this error change according to the value that you have set:
[XCUITestDriver@80f7 (c08262d9)] AxiosError: timeout of 240000ms exceeded
For reference Iām looking at this bug, which is slightly different, but may have some value for this:
Hi @Sai_q and @Lakshaya
not sure if this issue has been resolved on your side guys.
But i worked with our dev and checked first with safari web inspector and it didnāt work, so we checked the code and updated react-native-webview to the latest & added this capability (webviewDebuggingEnabled ) & took the build & it started working Seems nothing wrong with Appium but its related to the AUT. Hope this helps.
Hi @wreed & @mykola-mokhnach
In my last comment I mentioned it worked but via appium inspector I am able to switch to webview and can interact with elements in appium inspector too but while I am running my script getContextHandles returning just NATIVE_APP,
I am struggling on why itās not returning WEBVIEW context, initially I was on Java Appium client 8 & Selenium 4 but after reading quite a few articles , I got to know itās working for Appium Java client 9.0.0 with Selenium 4.15.0
Appium Java client 9.2.3.0 with Selenium 4.21.0
Tried with different appium Java client & Selenium compatible combinations, Not sure whatās the issue. Tried changing quite a few versions but no luck
Set<String> contextNames = ((SupportsContextSwitching) driver).getContextHandles();
for (String contextName1 : contextNames) {
System.out.println(contextNames); //prints out something like NATIVE_APP \n WEBVIEW_1
}
above code just returns NATIVE_APP, I am expecting it should return WEBVIEW_ context too.