Selecting dropdown in WebDriverJs

后端 未结 15 1168
星月不相逢
星月不相逢 2020-12-29 07:48

I have a dropdown box that I would like to select a value using WebDriverJS. I\'ve looked at the user guide below and could not find out how to do it

15条回答
  •  醉酒成梦
    2020-12-29 08:01

    I get same problem, and above solutions not working in my typeScript case

    But I still find a solution:

    await driver.findElement(By.id("ELEMENT_ID")).sendKeys("SOME_VALUE");
    

    Due to driver will return a promise when get a selector element

    So add await to do the next things

提交回复
热议问题