Could you please help me with horizontal scrolling in android (left to right and right to left)
Can any one help me on this…
What have you tried so far? I’ve written a basic tutorial for element-relative-swipes and screen orientation that might be helpful:
If that doesn’t work for you, come back with some more detail on what you’re trying to do, what you’ve tried, and the relevant Appium/Android/Language details.
Thank you for the reply… Will look into the tutorial.
Had tried scroll from top to bottom and bottom to top… its working… I am facing issue to scroll from left to right and right to left. I need to scroll completely to left to view the element. Anyways i will look into the tutorial and will reply back…
You are Awesome… It worked… Was trying to find the solution since 2 days… You made it easy… Big thank you…
I have another question…
Is there any way to find the toast messages… UIAautomator is not recognising…
I’m not sure on that one, I haven’t done any work on interacting with toasts. Given that they’re temporary, and not intended to be user-interactable, I’d be very hesitant to try to automate testing for a Toast object.
Appium automation is not very speedy, and I would expect that any test that specifically targeted a Toast would be inconsistent unless the toast lasted for a significant amount of time.
That said, these resources might be helpful:
It looks like it would be an instance of android.widget.Toast, so perhaps you could use
I wouldn’t expect there to be more than one toast on screen at a time, but like I said earlier, I would be surprised to get consistent results unless your toast stays up for a long time.
I was able to get toast messages working via the following general steps:
- Perform action to trigger the toast message to appear on screen
- Take x number of screenshots
- Increase resolutions of all screenshots
- Use tessearct OCR to detect the toast message.