Set hidden input value in Selenium?

后端 未结 2 1394
粉色の甜心
粉色の甜心 2021-01-02 12:03

We have hidden input fields on our form and we need Selenium to set the value of those fields. What is the best way to set the value of hidden inputs via Selenium IDE?

2条回答
  •  情话喂你
    2021-01-02 12:33

    Easiest way I could find:

    Command: runScript

    Value:

    javascript{this.browserbot.getCurrentWindow().document.getElementById('hiddenElementId').value='TheValue'}
    

提交回复
热议问题