Can i add a condition such that the bot selects second radio button if the first is already enabled?

Can i add a condition such that the bot selects second radio button if the first is already enabled?

radio button for a particular field will take only one input so what is the reason to check if the first one is ticked when you want to select the second one anyways

I need to add a condition that only if the first role radio button is “say:client” then the second role “say:analyst” should be selected.

You can use an if statement whereby the bot will check if condition A is true which is your first radio btn then execute condition B but also if radio btn A is not checked what should your bot since you cant leave it hanging

@new_user

use Get attributes Activity

1 Like

I want the bot to click “B” if “A” is not selected already and “A” if “B” is not selected. Can you attach a flow,if possible? @tshedzamclay

@amaresan-thanks! Two questions:

  1. Will the “checked” attribute work in radio button too?
  2. Can i use “if” condition as below?

Storing the value of an attribute in a variable called “output” using “checked”.
Calling ‘if’ activity and providing a condition if [output.Equals(“Data Analyst”)], then click “client support” else “cancel”.

@new_user

1.Yeah it will work

  1. it returns “True” or “False” in String, So You have to put condition like this "Output.trim.toUpper=“TRUE”"

@amaresan What does trim.toUpper do?

image

getting this error.

Hi @new_user

i think this is regarding selector issue

You have to select only Radio button don’t select entire “Raidio button and Data anlayst text”

The error vanished. However, the click on “client support” didn’t happen. Could you plz check if it is used correctly? @amaresan

@new_user

I think error in if condition

it should be like this Output.tostring.trim.toupper="TRUE"

@amaresan-changed! it didn’t click “client support” :confused:

@new_user

it throw any error? if then share me the Screenshot

Did you tried both method for clicking
Select only radio button and select radio button and client support text

after get attibuted put a message box as Output.tostring then let me know is true or false coming in the messagebox

It should be showing “true” as the role “data analyst” is checked.however, it shows “false” and it doesn’t click the “client support” :frowning:

@new_user

Your website is Open Source? can i able to Open

no it’s not

Hi new_user

Basically the output of the “checked” attribute is 0 or 1. 0 if unchecked and 1 if checked. So condition should be like If output = 1 then …