Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98893

Scrolling down to find element with text not working in android emulator

$
0
0

I am using Appium desktop server (v 1.15) along with java-client as 7.3.0 and selenium-server 3.141.59.

In my android emulator, I need to scroll down to view a text and stop the scrolling once the text is found. I tried using the following :

driver.findElementByAndroidUIAutomator("new UiScrollable(new UiSelector()).scrollIntoView(text(\""+text+"\"));");

driver.findElement(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textMatches(\"" + containedText + "\").instance(0))"));

where driver is AndroidDriver<MobileElement>

The issue I am facing is that the scrolling does not stop even if the text is correctly found.

Please help!


Viewing all articles
Browse latest Browse all 98893

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>