Less strict verification#795
Less strict verification#795TikhomirovSergey merged 3 commits intoappium:masterappium/java-client:masterfrom mykola-mokhnach:less_strict_verificationmykola-mokhnach/java-client:less_strict_verificationCopy head branch name to clipboard
Conversation
| * @return self-reference | ||
| */ | ||
| public T withCoordinates(int xOffset, int yOffset) { | ||
| checkArgument(xOffset >= 0, format(ERROR_MESSAGE_TEMPLATE, "X")); |
There was a problem hiding this comment.
Is it temporary change for backward compatibility with older servers versions?
I think it is not necessary to remove it. Just comment it, maybe with the TODO mark.
And before the publishing of the 6.0.0 we can remove //
There was a problem hiding this comment.
There might be a situation when it is necessary to provide negative absolute coordinates. For example, if the device has two screens and the second screen is located on the left side of the main one. That is why I'd consider this restriction as not very useful.
There was a problem hiding this comment.
Also, it is possible that one wants to drag an element to an off-screen area and negative coordinates might also have sense for such case.
There was a problem hiding this comment.
I agree with @mykola-mokhnach. I tried using java-client 6.0.0-BETA1, but I was needed to rollback due to the new limitation: we have cases when actions start at the screen, but end out off screen.
| final List<Runnable> invalidOptions = new ArrayList<>(); | ||
| invalidOptions.add(() -> waitOptions(ofMillis(-1))); | ||
| invalidOptions.add(() -> new ElementOption().withCoordinates(0, 0).withElement(null)); | ||
| invalidOptions.add(() -> new PointOption().withCoordinates(0, -1)); |
There was a problem hiding this comment.
Just comment I think
|
Ok |
|
Will publish it on this weekend |
Change list
moveTofix is not deployed to Appium yet, so it's OK to allow clients to still use relative coordinates. I've also added a note about the problem into the docstring.Types of changes