fix workaround for Safari 12.0.3 #9496
Merged
+12
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
The issue is that when the element's
getRect
command is executed there is a Safari workaround to extract a rect from the browser executing js snippet. The workaround applied when one of the properties (x, y, width, or height) is a falsy (!
) value, previously (in wdio 7) it was applied only if one of the properties were equal to null (== null
). The problem happens when on appium you extract a region that has one of those properties0
, it is a valid value, but js snippet execution fails everything on appium.Types of changes
I am replacing
!
with=== undefined
.Checklist
Further comments
I didn't find any tests in this area which is why I don't know how you guys usually test things like that. Feel free to add a test or instruct me on what I should add.
Reviewers: @webdriverio/project-committers