0

I have used basic data-driven testing to populate fields in Katalon scripts but how do I supply values (in Excel) to click checkboxes and radio buttons, please? Eg where one instance of the script requires a 'true' value, the next run requires 'false'.

What should Katalon action be?

Tutorials only seem to cover basics (eg text into user/password fields).

2 Answers 2

1

Use IF ELSE condition for check/Uncheck the checkbox same as for radio button also. In Excel store the Checkbox/radio button column value as 1/0 if 1- check 0-uncheck

 if(findTestData('UserGroup').getValue('Name',3)==1)
    {
       For Radio/Checkbox
       write a code to click
    }else{
       For Checkbox 
       write a code to uncheck
    }
1
  • if its work fine,please vote and press the tick
    – Vel Guru
    Commented Mar 19, 2018 at 13:43
0

Link used for Testing https://demo.nopcommerce.com/register?returnUrl=%2F

Excel File name is 'UseRadiobutton'. Testing for 'Gender' Radio Button

if(findTestData('UseRadiobutton').getValue('Gender',row)==M)
    {
       WebUI.click(findTestObject('UseRadiobutton/Page_nopCommerce demo store Register/input_male_Gender'))
    }else{
       WebUI.click(findTestObject('UseRadiobutton/Page_nopCommerce demo store Register/input_female_Gender'))
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.