Select a button whose position changing dynamically


#1

Hi All,

I want to select a button whose position changing every time when page is loading. Which activity we can use (except the selector) to capture the element? Click Image?Click Text?

What is the difference between Click Image and Click Text? Which one is beneficial over each other?

Regards,
Shirish


#2

Hi Shirish,

First, Would like to understand which application you’re automating. its Web, Desktop, Citrix?

If you’re able to select button using indicate on screen, then this button will have a selector, which contains all the unique attributes of that particular button. You can remove some attribute and make it generic.

Regarding, Click Text and Click Image - Click Text will first find text on the screen then it will click on it. Click image will try to match image which you have captured during element selection and then it will click. Both can be used… click image might not work if resolution or size of button is changed.

Thanks,
Kuldip


#3

Check out www.rpachallenge.com for a similar application to the one you try to automate and this post on how to automate applications when the position on the element changes on each load.
In most cases, you don’t want the selector to be fixed to the element position, you just need to find the fixed attributes that you use to identify the target element.