Programmatically Selecting an Item in a webradiogroup. (58 Views)
Reply
Frequent Advisor
rastek1
Posts: 91
Registered: ‎09-26-2011
Message 1 of 2 (58 Views)

Programmatically Selecting an Item in a webradiogroup.

Hi,

The page I am testing has a webradiogroup and in run time I want to select items automaciayy, not selcted on the data.

I don know which way to follow to use in this situation but I think to select an item automacailly, for example I want first (or second maybe) item int the WebRadioGroup to get selected programmaticaly while running the test.

 

When I select an item from webradigroup while recording, ir produces something like that..

 

'Browser("Denizbank").Page("Denizbank_2").Frame("frame_content").WebRadioGroup("GridRadioVP6d3b2987794a4884b0c").Select "0"

 

and when I write .... WebRadioGroup.

intelisense menu shows

 

_Default

_NewEnum

Count

GetProperty

Item

Setproperty

 

I am confused, which one do I need to use, and how ? Can anyone showan example, please ?

Please use plain text.
Regular Advisor
mohsenfi
Posts: 72
Registered: ‎01-14-2010
Message 2 of 2 (56 Views)

Re: Programmatically Selecting an Item in a webradiogroup.

So you want to always select the first item in your webradiogroup? Then the code you mentioned is the one you need to use:

Browser("xxx").Page("xxx").Frame("xxx").WebRadioGroup("xxx").Select "0"

The value "0" means the first item in your webradiogroup.

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation