cancel
Showing results for 
Search instead for 
Did you mean: 

How to find out whether particular HTML button is loaded/exists in the page and then click on it

RakeshParla
Level 3
Hi, I am trying to spy web application, where there are two different pages with same tiles, each page has different buttons based on it. This page will be loaded based on the data provided in the main page say "Ok" in following page 1 and "Create" in following page 2 (at a time any one page will load). I could spy two buttons and created elements for the same as well. While running the process, when I try to read the button before clicking getting error message if the button is not existed. Is there any way or option that I can check button existence before reading or clicking on it. I am new to BP and this is my first post. Please help me in finding the solution. Regards, Rakesh Parla.
4 REPLIES 4

raul_martos_con
Level 2
You can validate the existence of an element with the Wait Element, putting the element in the Action and the condition ""Check Exists"" Regards

Thank you. I have the following few questions. 1. Does wait step wail till the particular button loads or wait till the time specified?. 2. If it wait till button loads, what if button never loads because in my case any of the buttons will load (either Ok or Create). Regards, Rakesh Parla.

raul_martos_con
Level 2
1 - There are 2 outputs of the conditional Wait (2 arrows). If item is found it will go by ""Exists"" Arrow without waiting more time (can be useful to check page load) 2 - The time is the maximum time it will wait if item is not found. If not found it will Timeout and go for the other exit. Regards

Thank you Martos. I could do it using wait step. Regards, Rakesh Parla