Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

Following code works for selecting the last item from dropdown using Selenium 2.28 driver on Firefox and IE. Not working with Selenium Web Driver 2.40. I can see the dropdown opening but it is not responding selecting the option by using selectByIndex. How do I make it work? I am testing on Firefox 28 and IE8 on Windows 7.

WebElement dropDown = WebDriver.findElement(By.css("select name='tblCampaigns_length']"));
Select select = new Select(dropDown);
share|improve this question
are you getting any exceptions or other errors? Where is it failing at? –  Dan Snell Apr 11 at 15:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.