Id tag has different values - how can I still click it?


#1

Hi there,

I have to click a radio button, sometimes, it one of two different values:

Either the id will be:

id=“gwt-uid-45”

Or it will be

id=“gwt-uid-17”

“”" “”"

How do I deal with that? Exact code would be appreciated, as I did find some examples of it, but could not get it to work :frowning:


#2

Hi, have you seen this post already? How get Kantu to work with dynamic ID's


#3

Thank you! Got it sorted :slight_smile: :slight_smile: :slight_smile:


#4

Okay, ran the code not there fully yet.

The code on the web had the wrong quotation marks, so I replaced those to look like this

//*[contains(@id, “gwt-”)].

Problem is there are many ID options on the page, this now selects the wrong option.

I need to select either 17 or 45; basically

id=“gwt-uid-45”

OR it will be

id=“gwt-uid-17”

is there a way I can create one statement that will cover id=“gwt-uid-45” OR id=“gwt-uid-17”.

Thanks so much :slight_smile:


#5

basically there are a couple of round buttons to choose from, I’d like to choose the one with the label called “New Report”

– thing is sometimes that has id 17, or 44, or 48 - it depends on the form.

I’d love if I copy target based on the label value, which is;

New Report