Selenium IDE Drop Down option Selection not working in Firefox

3,794 views
Skip to first unread message

Joseph Yetukuri

unread,
Mar 21, 2012, 5:25:20 AM3/21/12
to Selenium Users
hello,

I'm trying to select a drop down value for an object, however when I
try to Select a Value running the recorded script below error occurs

com.thoughtworks.selenium.SeleniumException: ERROR: There was an
unexpected Alert! [No data received from server]
at
com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:
112)
at
com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:
106)
at
com.thoughtworks.selenium.DefaultSelenium.select(DefaultSelenium.java:
338)

Here is the Code

selenium.select("id=PRIMARYSTATEPROVINCE", "label=CA");



Please help me...

Thanks
Joseph

Vishal Mishra

unread,
Mar 21, 2012, 7:07:12 AM3/21/12
to seleniu...@googlegroups.com
Instead of select use
Click the arrow which open the drop down
driver.findElement(locatorOfArrow.)click

Click the option
driver.findElement(locatorOfOption).click


Joseph Yetukuri

unread,
Mar 22, 2012, 2:33:46 AM3/22/12
to seleniu...@googlegroups.com
This is Not working. FindElement is not a function in Selenium.

Any other help would be Great.




--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

Vishal Mishra

unread,
Mar 22, 2012, 2:53:36 AM3/22/12
to seleniu...@googlegroups.com
The above solution is if you are working on Webdriver if u are selenium 1

instead of select use
Click the arrow which open the drop down
selenium.click(locatorOfArrow)
Click the option
selenium.click(locatorOfOption)

selenium is the object of Selenium class

Joseph Yetukuri

unread,
Mar 22, 2012, 4:22:32 AM3/22/12
to seleniu...@googlegroups.com
Vishal Thanks for spending time, however the below solution does not work. Here is the actual code

selenium.select("//*[@id='PRIMARYSTATEPROVINCE']", "label=CA");

and here is how I defined based on your update

            selenium.click("PRIMARYSTATEPROVINCE");  -- Is Element which we have to Select
            selenium.click("CA"); --- Is a option in the above mentioned element.

Still I encounter the same issue as below.

FAILED: createCampaign

com.thoughtworks.selenium.SeleniumException: ERROR: There was an unexpected Alert! [No data received from server]
    at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:112)
    at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:106)
    at com.thoughtworks.selenium.DefaultSelenium.click(DefaultSelenium.java:186)
    at ondemandmkt_testcases.OndemandMktCreateCampaign.createCampaign(OndemandMktCreateCampaign.java:93)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Thanks
Joseph

Vishal Mishra

unread,
Mar 22, 2012, 4:30:08 AM3/22/12
to seleniu...@googlegroups.com
Locator Look Bad to me just provide the complete location for Arrow and then complete locator for mentioned element.

or copy paste the HTML i will give the locators.

Joseph Yetukuri

unread,
Mar 22, 2012, 5:04:28 AM3/22/12
to seleniu...@googlegroups.com
Hi Vishal,

Attached the image which has the HTML CODE. I'm selecting id=PRIMARYSTATEPROVINCE" WHICH HAS ONE OF THE VALUE EITHER CA/CO ETC...

Thanks
Joseph


On Thu, Mar 22, 2012 at 2:00 PM, Vishal Mishra <vishal....@gmail.com> wrote:
Locator Look Bad to me just provide the complete location for Arrow and then complete locator for mentioned element.

or copy paste the HTML i will give the locators.
vishal.GIF

Naveen

unread,
Mar 22, 2012, 5:51:12 AM3/22/12
to seleniu...@googlegroups.com
selenium.select("PRIMARYSTATEPROVINCE", "CA");

Try this.....

Joseph Yetukuri

unread,
Mar 22, 2012, 8:02:53 AM3/22/12
to seleniu...@googlegroups.com
I used selenium.getAlert() infront of the action am doing on a page and it solved my issue.

Thanks Guys for responding in a quicker turn.

-- Joseph

On Thu, Mar 22, 2012 at 3:21 PM, Naveen <naveen...@gmail.com> wrote:
selenium.select("PRIMARYSTATEPROVINCE", "CA");

Try this.....

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/JBIBI6ry_A4J.

Bhavana Shingote

unread,
Apr 14, 2015, 11:27:23 PM4/14/15
to seleniu...@googlegroups.com
Hello,
I am try to record drop down actions using selenium IDE. but some how it is not recording drop down options and also it does not show any error while recording.
so please can you help me  to solve this.
Reply all
Reply to author
Forward
0 new messages