I’ve tried: @driver_appium.scroll_to(‘my text’)
and @driver_appium.scroll_to(‘my text’)
But I still have :
undefined method `scroll_to’ for nil:NilClass (NoMethodError)
I’ve tried too: @browser.execute_script ‘window: scrollBy’, x: 0, y: -500
But nothing happens (but at least I don’t an error).
So what is the best way to scroll on Android Chrome with ruby ?
Thanks a lot guys
Sure, the problem is scroll_to only works on native apps. The implementation is based on UiSelectors and UiScrollable scrollIntoView. Neither of these work with Android Chrome.
For scrolling on a web browser, I recommend automating a swipe gesture in a loop with a timeout and checking if the text exists or not.