Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium IDE select2 selecting an item

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

like image 351
Decypher Avatar asked Feb 26 '14 08:02

Decypher


2 Answers

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.

like image 142
Decypher Avatar answered Oct 05 '22 23:10

Decypher


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') |
like image 25
Eduardo Andrade Avatar answered Oct 05 '22 23:10

Eduardo Andrade