18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

How to capture which Radio Button is selected from Radio Button List?

ChaitanyaChaitanya Members
edited October 2013 in Sahi - Open Source
Hello,
Situation.
1. List of Radio Buttons.
2. After adding any category radio button get dynamically generated.
In this case how I can get where to click on specific radio button?
for this purpose I used following code.
//--Start of Code--
_assertExists(_span("ABC"));
_click(0,_near(_span("ABC")));
//--End of Code--
Here Assert display green in log file, it means it finding span named ABC. But it unable to click on that radio button.
In this case what I want to do?

Regards,
Chaitanya.

Best Answer

  • Hi,
    Please replace the following line:
    _click(0,_near(_span("ABC")));
    
    with:
    _click(_radio(0,_near(_span("ABC"))));
    
    If that doesn't work, let me know the HTML structure of the elements you mentioned.

    Regards.

Answers

This discussion has been closed.