@jigtest Hi,
1. I have tried with below coding in mobile web page using web driver. Its work fine in scrolling from top to bottom in the mobile web page. Same code I have tried it in scrolling an android and iOS app page using appium driver. It doesn't work at all.
// scroll up
((JavascriptExecutor) driver)
.executeScript("window.scrollTo(0, document.body.scrollTop)");
// full scroll to bottom in slow motion
for (int second = 0;; second++) {
if (second >= 4) {
break;
}
((JavascriptExecutor) driver).executeScript(
"window.scrollBy(0,400)", "");
sleep(2000);
}
-
For scrolling an android app till particular text, I have used below defined methods. Its works fine to scroll till an particular text. But, I want to scroll to top to bottom of an app page without using particular text.
// method 1
driver.ScrollToExact("Text");
// method 2
driver.scrollTo("R");
How can I able to scroll an app page from top to bottom using java?