Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Am using the above code but it's not working."s2id_customFilter" is the id of the drop down.Am clicking on the id and sending keys but there's no action from selenium.

My code:

jQueryWebElement filterElement = selenium.jQuery("#s2id_customFilter");
JOptionPane.showMessageDialog(null, "one");
share|improve this question
Probably depends on where the focus is. If you put a call to Click() first, to make sure focus is on the drop-down list, does that make a difference? – vincebowdren Jun 20 '13 at 15:32
I agree with @vincebowdren . It sounds to me like a focus issue as well. – djangofan Jun 20 '13 at 19:59
@vincebowdren ... No difference it's still not working.Yes i have mentioned a click() before the above code to click on drop-down. – kittudk Jun 21 '13 at 8:06
@selenium_vtiger If that's the solution you used to get the job done, perhaps you could craft a small post describing that, and then accept it as your solution? That'd be greatly appreciated! – corsiKa Mar 13 '14 at 18:16
Ive got the same issue and reported here – Philip Beadle Dec 11 '14 at 22:27

I really like the answer from the link Philip Beadle posted in a comment:

It's a bad idea to test the core browser's behaviour as it's not your logic, i.e. you should not need to test that arrow keys work with options since that's something your browser implements.

And some Protractor (JavaScript) examples how to handle the drop from the same link:

var options = element('s2id_customFilter'));

And another one when the text changes a lot or is dynamic:

var optionsElements = element('s2id_customFilter')).all(by.tagName('option'));
    optionsElements.count().then(function(count) {
      console.log('I have ' + count + ' options')
    optionsElements.get(1).click(); // click on 2nd option

You should be able to do something similar in Java.

share|improve this answer

I think you need to move cursor first. Did you try to use moveToElement(WebElement toElement) before clicking on it? This link may be helpful.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.