-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix hybrid element position determination #1906
fix hybrid element position determination #1906
Conversation
when switched to the webview of a hybrid app the elements on the screenshot were not aligned with the expected position. This will fix that by determining the position of the first webview on in the hybrid app
|
const chromeCustomCaps = { | ||
const {platformName = ''} = caps; | ||
const androidCustomCaps = { | ||
// @TODO: remove when this is defaulted in the newest Appium 1.8.x release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1.8.x? must be a quite old one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was code I copied over, not sure if we still need it but didn't want to change that in this PR
Given that this is being targeted to the old AD repo, I don't see that it will ever be published. This PR should be opened against the inspector repo instead. (Unless @KazuCocoa is specifically publishing old versions of AD, which I think would be confusing now that we have fully made the switch). |
yea, the reason why I've maintained this branch was the inspector blocked https connection. That was already resolved in a recent update (HTTP libraries and webdriverio update). So it would be great to create the same change to the inspector repo. afaik, after appium/appium-inspector#118 , cloud vendors also can use appium-inspect on their env. |
I totally understand @jlipps and @KazuCocoa But this is a fix for a customer who is using Sauce Labs which is currently not yet supported with the new one (or is it now). |
@wswebcreation the new one will support sauce labs as soon as I merge the other PR. I think just need someone to sign the CLA for me to do that. so I would be able to publish that other one sooner than this one probably. |
Which CLA do you mean @jlipps ? I’ve build the app now on my local machine and send it to the customer so we’re good now |
I see. 1.22.0 version will be the separate inspector version, so the patch will reduce confusion, I think. |
A patch would be great if that is possible |
Thanks @KazuCocoa !!! |
When switched to the webview of a hybrid app the elements on the screenshot were not aligned with the expected position. See screenshot
Android:

iOS:

This PR will fix that by determining the position of the first webview on in the hybrid app, see below
Android:

iOS:

This will also fix the issue that Android hybrid apps got stuck when switching to the webview. The
nativeWebScreenshot
was needed to get a full screen screenshot instead of the ChromeDriver Webview screenshot