如何在Android中选择Appium中的文本
**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']"
如何在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
我用这些依赖项列表使用:
<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>
根据最新版本的Appium,请帮助我解决我的代码上的错误,我将通过在自动化测试中学习来处理。 我展示了许多解决方案,但没有人为我工作。 如果您需要更多详细信息,请问我,我将提供另一个详细信息
**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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论