How to select the radio button?

Hi All,

I need to select a radio button based on the input which is come from database
i.e the radio button’s aaname is the first and last name of a person( which is come from input mssql database).
In short I need to select the radio button dynamically.

anyone please do needful to resolve this.

@ppr
@ushu
@Gokul001
@Nithinkrishna
@geetishree.rao
@Palaniyappan
@Yoichi
@Rahul_Unnikrishnan


I need to select a radio button which are below the header select family member

Hi @HeartCatcher

Can you share the selector in the UI explorer (We can achieve via Increasing the IDX from the selector)

Regards
Gokul

Hello @HeartCatcher

Can you inspect on a checkbox using ui explorer and share the selector screenshot here.
Also, what is the value retrieving from the database? Usually, the query will output as data table, so it only has one row of data or multiple rows are there?

if you just want to know the dynamic selector, you can watch the below video.

Here I have selected 4th family member from the list

Can you share the DB value that need to be select here @HeartCatcher

Joseph- Firstname
Walker-Last name
(09/17/1978)- DOB

Names
It will come like this

Hi @HeartCatcher

You can remove the aaname from the selector. And in the Id pass the variable in it.

FirstName - row(“Columname”).tostring
LastName - row(“Columname”).tostring
Name = FirstName+“_”+LastName

Here- Name, FirstName & LastName is the variable

Combine the First and Last Name

In the selector id=Name

Regards
Gokul

1 Like

Ok, will try and let you know.
thanks

THanks it is working correctly.
One more condition on this I need to click the radio button only the patient exist if not I need to click always first radio button.

@HeartCatcher Enclose the current activity in a Try Catch block. If Selector Not Found exception occurs then in catch block keep the activity which always clicks on first radio button

Can you elaborate this? How do you know the patient is exist or not?
@HeartCatcher
You can use if condition
Then part
click the corresponding radio button

Else part
Click always first radio button

Regards
Gokul

I mean that the patient name is based on the input coming from the DB after combining and passing the variable if the patient name in the browser and from db are matched means need to click on specific radio button if not neeeds to click first radio button always.

First you need to get the value (Radio button) and store in the value based on increasing the IDX value in the selector.

After that use the If condition and check the patient is exist or not.

Regards
Gokul

Thanks@Gokul001

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