简体   繁体   中英

How can you escape the "garbage" elements from the previosly page? (appium android java selenium)

Appium version:1.13 version, Android version of the phone:9(phone galaxy A10) Java:1.8

Hi!

I am trying to verify a search in an android native application. I thought I could simply take the list of elements after search and to verify that they contain the searched word. But unfortunately, there are some hidden elements (probable garbage from the previous page where all of the elements are showed) and when I extract the list I take the garbage elements as well and I can't filter thought them. (they have the same attributes and they are displayed(.isDisplayed) and I've tried to click them and to filter the list through this but it doesn't always work(depending on what I search) (and select the element has the same behavior as clicking them). A colleague of mine told me to alt-tab the application and then get back in it but this didn't refresh the page.

Do you people now any other solution? Do you ever experienced this with appium or is this the fault of the app? There is any other solution to refresh the page and the elements in a native android application?

Thx.

在此处输入图片说明 在此处输入图片说明

解决方案是更好地调查 AppSource 并找到仅出现在所需页面上的“父级”,并在其层次结构中搜索我的元素。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM