Selenium IDE select2 item selection

Pretty new to the IDE selenium.

I am trying to get this to work, but I have some problems with select2. I examined other issues, such as: Selenium IDE-Automating Select2 Search Box , etc ..

What I still have:

clickAt | css=.select2-choice | sendKeys | css=#select2-drop input.select2-input | Adobe clickAt | css=.select2-result-label:contains('Adobe') | 

It opens select2, "Adobe" types and filters, but does not click on the result that it finds. Any ideas / suggestions?

Yours faithfully

+7
ide selenium jquery-select2
source share
3 answers
 clickAt | css=.select2-choice | sendKeys | css=#select2-drop input.select2-input | Adobe pause | 1000 clickAt | css=.select2-result-label:contains('Adobe') | 

This fixed this, pausing in the middle. It went quickly, if you put Selenium in "Slow mode", everything went fine, just as soon as it swept over it.

+11
source share

I think better without a “pause” (performance)

 clickAt | css=.select2-choice | sendKeys | css=#select2-drop input.select2-input | Adobe waitForVisible | css=#select2-drop | clickAt | css=.select2-result-label:contains('Adobe') | 
+6
source share

I found this way

Ruby Code:

 element = @browser.element(:xpath => '//xpath/to/a.select2-choice') element.focus @browser.send_keys [:shift, :tab] @browser.send_keys :tab @browser.send_keys :arrow_down 
0
source share

All Articles