18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
radiobutton value changes
Hi,
I have a radio button "_radio("_handle[83152][status]" where the call_handling[no]
changes every time..I need to get the value of the call handling every time...
and then verify for checked/not....
Can anybody help me.....
I have a radio button "_radio("_handle[83152][status]" where the call_handling[no]
changes every time..I need to get the value of the call handling every time...
and then verify for checked/not....
Can anybody help me.....
Comments
Regards,
Narayan
Yes there is a radio button _radio("handle[83152][status]") above it which is constant.
Here when we create with a new handle the value is new(can't assume) and gets added up.So I
need to get the value every time after creation...
Could u explain me the _near or _in, since I am new to this tool?
Have a look at DOM Relations in Browser Accessor APIs: http://sahi.co.in/w/browser-accessor-apis
It explains how to use _in and _near to get to elements whose ids are not constant.
For example, the textarea near "Write message:" on this screen can be accessed by
_textarea(0, _near(_span("Write message:")))
It may be easier if you post the HTML of the section containing the radio buttons, for us to understand the structure better.
Regards,
Narayan
it worked out fine with
_assertNotTrue(_radio(/call_handle/, _near(_link("My default rules")).checked));
Narayan this is for the nearest(radio) one to My default rules link...but for 2nd and 3rd links not working out...
like for _assertNotTrue(_radio("/call_handle/[1]", _near(_link("My default rules")).checked));
_assertNotTrue(_radio("/call_handle/[2]", _near(_link("My default rules")).checked));
_assertNotTrue(_radio(/call_handle/, _near(_link("My default rules"))).checked);
_assertNotTrue(_radio("/call_handle/[1]", _near(_link("My default rules"))).checked);
_assertNotTrue(_radio("/call_handle/[2]", _near(_link("My default rules"))).checked);