9

Pretty new to selenium IDE.

I've been trying to get this to work but I have some issues with select2. I've looked into other issues like:Selenium IDE-Automating Select2 Search Box etc..

What I have so far is:

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

It opens the select2, types ' Adobe ' and filters, but it won't click on the result it finds. Any ideas/suggestions?

Kind regards

3 Answers 3

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

This fixed it, putting a pause in the middle. It went to fast, if you put Selenium on ' Slow mode ' it went fine, just on fast it sweeped over it.

Sign up to request clarification or add additional context in comments.

Comments

6

I think is better without "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') |

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.