how to select value from a drop down using Selenium IDE

前端 未结 9 2717
灰色年华
灰色年华 2021-02-20 09:26

I am using Selenium IDE for the first and has no knowledge of automation scripting. So far i am able to manage using IDE but one issue is I am not able to select a value from dr

9条回答
  •  Happy的楠姐
    2021-02-20 09:49

    a quick and dirty javascript starting point:

    click me

    and the (somewhat) corresponding seleniumIDE runScript command:

    command

    runScript
    

    target:

    document.getElementById("myDropdown").selectedIndex = Math.floor(Math.random() * (document.getElementById("myDropdown").options.length-1))+1);
    

    The +1 at the end is entirely optional: I've included it to prevent seleniumIDE from selecting the first

提交回复
热议问题