Dsh1231
New Member.
743 views

Handling radio buttons in Silk Test Classic

Hi,

I am trying to get all the items in an array for a radio button object.

Consider a radion button has two items 'item1' and 'item2'

I am using the below code.

LIST OF WINDOW lBrowser = Desktop.FindAll("//BrowserApplication")

WINDOW wRadio = wBrowser1.Find("//input[@id='radiobutton1']")

LIST cItems = wRadio.RadioListItems

Print(cItems[1])

Print(cItems[2])

 

When I execute the code instead of the actual item it is printed as '1' and '2'. I just want to print 'item1' and 'item2'

 

Can anyone please clarify.

 

Thanks.

0 Likes
2 Replies
Highlighted
Micro Focus Contributor
Micro Focus Contributor

RE: Handling radio buttons in Silk Test Classic

Hi Dinesh

I am not able to reproduce the issue, when I run against some sample radioButton controls, for example: elm-lang.org/.../radio-buttons


[ ] WINDOW wRadio = Desktop.Find("//BrowserApplication//FRAME[@name='output']//INPUT[@name='font-size']")
[ ] List cItems = wRadio.RadioListItems
[ ] Print(cItems[1])
[ ] PRint(cItems[2])


Prints: small, medium

Can you confirm which version of ST you are using, against which browser &version? and if the issue is specific to your web application as opposed to other apps like the URL i have mentioned above?

Thanks,
John
0 Likes
Dsh1231
New Member.

RE: Handling radio buttons in Silk Test Classic

Hi,

I have checked in other 3 applications. I am not able to get the list items. For wRadio.RadioListItems, only index values are printed.
I am using Silk Test 17.5 , Silk Test classic- OA, IE11

Please clarify

Thanks
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.