# Radio buttan selaction

**URL:** <https://forum.katalon.com/t/radio-buttan-selaction/80774>\
**Category:** Integrations\
**Tags:** katalon-recorder, web-testing, integrations, katalon-studio\
**Created:** [November 20, 2022, 1:11am UTC](https://forum.katalon.com/t/radio-buttan-selaction/80774 "2022-11-20T01:11:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![niralakashipurvala](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/niralakashipurvala/32/20464_2.png) [@niralakashipurvala](https://forum.katalon.com/u/niralakashipurvala)\
**Post date:** [November 20, 2022, 1:11am UTC](https://forum.katalon.com/t/radio-buttan-selaction/80774/1 "2022-11-20T01:11:52Z")

</div>

i have problam in checking radio button, Let s say i have radio button name male,femal,tranc no i want to select male and the value it take from excel,then another ntime i want to select female from excel , then another time i want to selact trance from excel every time diffrent is thair anty way to do this.

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [November 20, 2022, 3:00am UTC](https://forum.katalon.com/t/radio-buttan-selaction/80774/2 "2022-11-20T03:00:54Z")

</div>

How about putting the state of the radio button within an **if** statement and use the Excel data as the “condition” whether to check the radio button or not? You can use any indicator you want in your Excel and replace the word, ON, which I used.

> **Maybe like:**
>
> ```auto
> if (excelData.getValue(1,radioMale) == "ON") {
> WebUI.check(findTestObject('radioMale'))
> WebUI.verifyElementChecked(findTestObject('radioMale'), 10)
> WebUI.verifyElementNotChecked(findTestObject('radioFemale'), 10)
> WebUI.verifyElementNotChecked(findTestObject('radioTrance'), 10)
> }
> if (excelData.getValue(1,radioFemale) == "ON") {
> WebUI.check(findTestObject('radioFemale'))
> WebUI.verifyElementNotChecked(findTestObject('radioMale'), 10)
> WebUI.verifyElementChecked(findTestObject('radioFemale'), 10)
> WebUI.verifyElementNotChecked(findTestObject('radioTrance'), 10)
> }
> if (excelData.getValue(1,radioTrance) == "ON") {
> WebUI.check(findTestObject('radioTrance'))
> WebUI.verifyElementNotChecked(findTestObject('radioMale'), 10)
> WebUI.verifyElementNotChecked(findTestObject('radioFemale'), 10)
> WebUI.verifyElementChecked(findTestObject('radioTrance'), 10)
> }
> 
> ```

If you want to test the radio buttons one after the other, then you should put a delay inline of the **if** statement.

---

<div class="post-metadata">

**Author:** ![niralakashipurvala](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/niralakashipurvala/32/20464_2.png) [@niralakashipurvala](https://forum.katalon.com/u/niralakashipurvala)\
**Post date:** [November 24, 2022, 6:37am UTC](https://forum.katalon.com/t/radio-buttan-selaction/80774/3 "2022-11-24T06:37:29Z")

</div>

can you provide a video or video link to do that i an stucking hear since 1 month , because it was easy to handal it by video.

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [November 24, 2022, 3:51pm UTC](https://forum.katalon.com/t/radio-buttan-selaction/80774/4 "2022-11-24T15:51:07Z")

</div>

There are several videos in the following link that might help.

[Read and write data from excel in katalon studio – Codebun](https://codebun.com/read-and-write-data-from-excel-in-katalon-studio/)

---

<div class="post-metadata">

**Author:** ![niralakashipurvala](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/niralakashipurvala/32/20464_2.png) [@niralakashipurvala](https://forum.katalon.com/u/niralakashipurvala)\
**Post date:** [November 24, 2022, 5:02pm UTC](https://forum.katalon.com/t/radio-buttan-selaction/80774/5 "2022-11-24T17:02:03Z")

</div>

buddy. i know data drivan testing very well i just want ti ask you how to use this it stetment for radio butten any video for this

---

<div class="post-metadata">

**Author:** ![niralakashipurvala](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/niralakashipurvala/32/20464_2.png) [@niralakashipurvala](https://forum.katalon.com/u/niralakashipurvala)\
**Post date:** [November 24, 2022, 5:03pm UTC](https://forum.katalon.com/t/radio-buttan-selaction/80774/6 "2022-11-24T17:03:31Z")

</div>

i kow very well about how to make data fill and test sweet in katalon i just want to ak you how to do this with radio butten plz help me bro plz

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [November 24, 2022, 6:11pm UTC](https://forum.katalon.com/t/radio-buttan-selaction/80774/7 "2022-11-24T18:11:09Z")

</div>

Sorry. I’m not sure of the concern. I have given you an **if** statement concept, so now you have to make some reference in your data file to indicate you want the radio button to be on (or off). Then you read your data file and use the text of your data file as a switch–the **if** statement needs a **condition** that compares to be true or false. So, maybe you have the word, ON, in your data file for the “radioMale” button, then you code something like below:

```auto
if (excelData.getValue(1,radioMale) == "ON") 

```

([Groovy - If/Else Statement](https://www.tutorialspoint.com/groovy/groovy_if_else_statement.htm))

There are many ways you could be getting your data values, so whatever you need to get the text or number for your “radioMale” button, do that in place of what I used (it was only an example):

```auto
excelData.getValue(1,radioMale)

```

Perhaps you are only using the **Manual** tab. If that be the case, then you will have to use: Decision Making Statement. I don’t use the Manual tab, so that will be on you to get the statements as you want them.

---

<div class="post-metadata">

**Author:** ![niralakashipurvala](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/niralakashipurvala/32/20464_2.png) [@niralakashipurvala](https://forum.katalon.com/u/niralakashipurvala)\
**Post date:** [November 24, 2022, 8:27pm UTC](https://forum.katalon.com/t/radio-buttan-selaction/80774/8 "2022-11-24T20:27:14Z")

</div>

Thanks I found my solution 👍  
I have 2 more questions for you  
I want to select date from 📅 date picker from Excel. Let’s say Frist time we have to pic 02/11/2022 then second time we have to pic 09/12/1991 and so on.  
Note… we can not put date directly we have to pic it from date picker.

1. Is thair any way to extract data from image and put it in Excel or katalon studio or extract valuable data and put it to web form

And last but not least thanks again

---

<div class="post-metadata">

**Author:** ![grylion54](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/grylion54/32/16265_2.png) [@grylion54](https://forum.katalon.com/u/grylion54)\
**Post date:** [November 24, 2022, 9:45pm UTC](https://forum.katalon.com/t/radio-buttan-selaction/80774/9 "2022-11-24T21:45:59Z")

</div>

I assisted another OP on their date picker. Unfortunately, there are a lot of different date pickers, so this may just be an example for how to separate the various parts of the date picker and then pick and parse your way through it.  
The easiest obviously is to use setText(), but if you can’t then you can try something like I did back then.

> [@Automated date field](http://forum.katalon.com/t/automated-date-field/55622/2):
>
> The first thing to do is to right click on the date GUI and review the HTML. Then it depends if you can select a static date, or current date (i.e. just click on the “Today” link), or if you need to input a specific date (dynamic). 
> 
> > **Maybe try**
> >
> > I created two objects based on the HTML of OUR Calendar GUI: select\_DatePickerMonth and select\_DatePickerYear. For these two objects, I used a simple xpath for each–again, review your HTML. select\_DatePickerMonth //select[@class="ui-datepicker-month&…
