Selenium IDE-Automating Select2 Search Box

前端 未结 1 1290
遥遥无期
遥遥无期 2021-02-15 14:13

I am trying to automate the select2 search box in selenium IDE. I got it to open and also typed the search keyword I am searching for.However even though I have the code in plac

相关标签:
1条回答
  • 2021-02-15 14:36

    I've had to deal with this as well, the sites I test use select2 and select3. What I've found that works in both situations would be the following:

    clickAt | css=.select2-choice > div > b | 
    sendKeys | css=input.select2-input.select2-focused | Chris
    click | css=.select2-result-label:contains('Chris')
    

    With these types of dropdowns, and Angular, I found sendKeys works better than type or typeKeys.

    Klendathu

    0 讨论(0)
提交回复
热议问题