Button is nested in code so unable to validate it

I have a button that I need to click but for the life of me I cant figure out why it wont click (It is quite nested so have had problems previously when using Katalon)

Whilst the button doesnt change some of the text used changes, ie from Twin delux to Standard twin

I have attempted to make a selector, which has been validated but its just not clicking the pod open, so wondered if someone could explain what I am doing wrong please

I have only been doing this for a couple of weeks, so go easy on me please :). (ive watched numerous videos, read so much documentation and realised Im a hands on person)

You should avoid using class in selectors. Class can easily change.

Open UI Explorer, indicate the element, and then post a screenshot showing the properties in the upper right.

1 Like

You should do the training at academy.uipath.com - it’s free and will give you the foundation necessary to understand things like how selectors work.

1 Like

Thanks im 4 hours into the 44 hour course, so getting there slowly.

1 Like

Hi, these are all the properties it shows.

I just noticed you have data-mastergrade='*' in your selector. This is pointless. It’s the same as just not having data-mastergrade in the selector at all. The * is a wildcard that means it’ll match any value.

In UI Explorer, if you mouse over to the right of aaname a popup will appear showing the value. It’s possible there’s a value there but with a ton of spaces before it so it looks like no value. Check that and let me know what you find.

Are you trying to click the button based on the text of the button (ie click the button that says 29 Standard Twin cabins?

1 Like

I really appreciate your help with this as believe it or not, im learning a lot from this interaction.

.

the text changes constantly for that button, as its dependant on how many cabins are available, so I just need to click that button regardless of what the text says .

then you have to clear the context of the button, in which the button is located. Herefore analyze the surrounding / parent elements within UiExplorer / Browser F12 Webtools

1 Like

Is any part of the text always the same? Like does it always have the word cabins at the end? Then you’d do visibleinnertext=‘*cabins’

1 Like

Alternatively if the link with its innertext is too variable that it can’t be captured with wildcards, you could tryy to target just the A element without any specifics in it, but anchor it to the outer element which might be specific enough.

2 Likes

thank you to everyone for your help. I managed (with a devs help) to click the button using text and the wildcard. Which worked. woohoo

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