New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swiping an element does not work #409
Comments
Thanks @rompic We will look into this ASAP. |
on a real device I get saner output, but it still does not work: |
@rompic @SrinivasanTarget Have you tried that something like menu.swipe(SwipeElementDirection.UP, 200, //this is the offset from the start board,
100, //this is the offset from the end board
100); ? |
tried your example on a real device: on emulator: still this looks like a bug. I actually used a similar call to yours to swipe one "page" of a menu to collect all entries. This at least seemed to work before updateing (note that either the method signature of swipe changed or I got it wrong in this case and it worked by chance).
btw. would be great if you can point to a better way of doing this. |
@TikhomirovSergey I suspect this seems to be a bug only if offset is
|
@SrinivasanTarget There may be a problem when an element is partially visible on a screen and other parts are outside of screen borders. May be it is the server problem (wrong coordinates are returned). It looks wrong. menu.swipe(SwipeElementDirection.UP, 1, 1, GestureHelper.getScreenHeight()-1) The last parameter is a time. @rompic What happens if you try to do something like that Dimension size = menu.getSize();
Point location = menu.getLocation();
driver.tap(2, location.x + size.getWidth(), location.y + size.getHeight(), 2000) or perform another touch action with same coordinates? |
@TikhomirovSergey I get
|
when will it be fixed? |
@shynkevich-alex These methods (swipe/othere gestures) are going to be deprecated. Probably it won;t be supported anymore. |
@TikhomirovSergey @SrinivasanTarget so all these would move to TouchActions ? |
@saikrishna321 No. There will be no predefined gesture methods. They are flacky and don't work in many user cases. We will allow users to construct any gesture on their own. But I think we should provide some feature instead to simplify user's work |
Description
I'm experiencing a similar problem as in #350
If I try to swipe an android drawer menu with
menu.swipe(SwipeElementDirection.UP, 100);
I get an error stating that the coordinates are outside of the display bounds:
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Display bounds: [0,0][1080,1776]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":13,"value":"Coordinate [x=390.0, y=1893.0] is outside of element rect: [0,0][1080,1776]"}
Expected behaviour:
Swiping up or down is possible.
This or similar code worked before updating to 1.5.2 with java-client 4.0.0
Environment
Details
Please provide more details, if necessary.
@AndroidFindBy(id="ab_omg_menu_left_layout")
private MobileElement menu;
Code To Reproduce Issue [ Good To Have ]
see above
Ecxeption stacktraces
Link to Appium logs
https://gist.github.com/rompic/a143b5540312254eef0ca8960d7a8028
The text was updated successfully, but these errors were encountered: