Jump to content
Sign in to follow this  
Ram

selecting combobox value that are hidden

Recommended Posts

Ram

I have a page that has radio button and also combo box (US places as option). The combo box is connected to the radio button. By default I don't see any options in the combo box. When I click on the radio button I get all the options in the combo box.

I have written the script to select radio button and also written the script selecting the combo box but combo box doesn't seem to select required value. In the combo box "byValue" & "byText" didn't work, the "byIndex" worked but this can't be used as I don't know in which index a particular place can be..How do you go about selecting a value that is hidden.

Attached HTML page for your reference cmatch.html

and this is what I have done.

For Radio Button

$oFrame = _IEFrameGetObjByName ($oIE, "matching")
$oForm = _IEFormGetObjByName ($oFrame, "matching")

_IEFormElementRadioSelect ($oForm, "bavailcountry", "bavailcountry", 1, "byValue")

For Combo Box

$opFrame = _IEFrameGetObjByName ($oIE, "matching")
$opForm = _IEFormGetObjByName ($opFrame, "matching")
$opSelect = _IEFormElementGetObjByName ($opForm, "bplace")

_IEFormElementOptionselect ($opSelect, "Boston MA", 1, "byText")

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.