1 year ago
#376741

Rushabh Shah
How to select Text in appium in android
**Appium version:**
Xpath:
/hierarchy/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.LinearLayout/android.widget.FrameLayout/android.widget.RelativeLayout/android.widget.FrameLayout[1]/android.widget.RelativeLayout/android.widget.ScrollView/android.widget.RelativeLayout/androidx.recyclerview.widget.RecyclerView/android.widget.RelativeLayout[5]/android.widget.RelativeLayout/android.widget.LinearLayout/android.widget.TextView
android.widget.TextView[@text='Test Group']"
**I am so Confuse I tried last 2 day to find solution for this my query.
How to Select my text in appium?**
**I tried many thing but Unable to click....**
List results = driver.findElements(MobileBy.AndroidUIAutomator("new UiScrollable(new UiSelector()).scrollIntoView(" + "new UiSelector().text(\"Test Group\"))"));
((WebElement) results).click();
Result : Nothing
List<WebElement> SelectGroup = driver.findElements(By.xpath("//android.widget.LinearLayout[@resource-id='com.flipkart.android:id/product_list_product_item_layout']/android.widget.RelativeLayout[@index='1']"));
((WebElement) SelectGroup).click();
Result : Nothing
I user those Dependency List:
<dependencies>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.1.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.appium/java-client -->
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>8.0.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.testng/testng -->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>7.4.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Please Help me on As per latest version of APPIUM I try to fixed that error on My Code I will process by learning in Automation testing. I show many Solution but no one is working for me. if you need more details please ask me I will give another details
automation
appium
appium-android
appium-desktop
appium-java
0 Answers
Your Answer