Hi,
I found that there is no Keyword in the Robot framework for verifying if the radio button has been selected or not when the name attribute is not present for the radio button group. I tried the below snippet of code. The robot framework needs a group name but in the HTML, I didn’t find any attribute with “name”.
${is_Selected}= Radio Button Should Be Set To Home Delivery homeDelivery
Run Keyword If ${is_Selected} Log Radio button is not selected ELSE Log Radio button is selected
Output:-
DevTools listening on ws://127.0.0.1:58547/devtools/browser/4e6d0887-95fd-4d4a-8069-963a7fb92aa5
Add a Barbie product to cart from PLP page | FAIL |
No radio button with name ‘Home Delivery’ found.
test PLPOrderAdd :: To add a product to Cart from PLP page | FAIL |
1 test, 0 passed, 1 failed
Is there a way I can use any other attribute instead of a name here or can I use any other syntax to check if the radio button has been selected or not? Can I use the custom library of Python to do this? If yes, how?
Regards,
Subodh