Skip to content

Conversation

mykola-mokhnach
Copy link
Contributor

@mykola-mokhnach mykola-mokhnach commented Dec 19, 2017

Change list

moveTo fix 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

  • No changes in production code.
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
* @return self-reference
*/
public T withCoordinates(int xOffset, int yOffset) {
checkArgument(xOffset >= 0, format(ERROR_MESSAGE_TEMPLATE, "X"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 //

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just comment I think

@TikhomirovSergey
Copy link
Contributor

Ok

@TikhomirovSergey
Copy link
Contributor

Will publish it on this weekend

@TikhomirovSergey TikhomirovSergey merged commit e76d217 into appium:master Dec 22, 2017
@mykola-mokhnach mykola-mokhnach deleted the less_strict_verification branch January 5, 2018 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants