Element Exist not working as expected

i am trying to perform some set of actions on every page of table which may have random number of pages.
but when i try get attribute it always return empty value


what might be the reason? pls help… I need to navigate through all pages, and stop the execution on the last page.

Hey @Karthik_Krishnan1

use For Each UI Element if, take the page numbers, and pass each element to click activity



If you are working with table extraction try Data Scraping method you can provide the next pages to extract the complete data


For now, can you compare results of UiExplorer in the next button is enabled or disabled?
If there is different attribute of selector b/w them, can you try to use CheckAppState or ElementExists using the selector attribute?



Multiple ways to acheive this

  1. Use for eqch ui element activity
  2. Use check app state and see if that works
  3. Use ui explorer and find the differences between the attributes when the last page is reached and when the next button is still avilable

Any of the above works…just check the differences


Hi @Karthik_Krishnan1

  1. Use a “While” loop to navigate through pages.

  2. Inside the loop, use the “Get Attribute” activity to retrieve an attribute that indicates whether the next page button is active or disabled. This might be “class”, “outerHTML”, or another attribute depending on the website’s implementation. You can use UI Explorer and see the differences when you reach to last page.

  3. If the next page button is disabled (which typically indicates you are on the last page), exit the loop.

  4. If it’s not disabled, click the next page button and continue the loop to perform actions on the next page.

Hope this helps

Thank You for the response @fernando_zuluaga

I tried looping through the UIElement…Kindly find the code and the output below




It is actually looping through the visible text only…is there any configuration/settings i am missing ?

Thank You @Yoichi …I tried to compare the results in UIExplorer when both button is enabled and disabled…the difference is in aastate…Thank You.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.