admc / wd

A node.js client for webdriver/selenium 2.
Other
1.53k stars 402 forks source link

Scroll to non visible element in Android native app #601

Open psociety opened 5 years ago

psociety commented 5 years ago

I'm testing the signup form of my app. The form is long enough to require scroll, therebefore Signup button is not visible.

I tried to:

(await driver.elementById('signup')).click();

But crashes because its not on screen.

Then i tried things like:

await driver.moveTo(await driver.elementById('signup')); // seen in https://github.com/admc/wd/blob/master/doc/api.md
(await driver.elementById('signup')).moveTo(); // seen in https://github.com/admc/wd/blob/master/doc/api.md
await driver.scroll(10, 100); // seen in http://appium.io/docs/en/commands/interactions/touch/scroll/

But non of them are working. Is there any method to scroll in android native app?