Set hidden input value in Selenium?
问题 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? 回答1: Easiest way I could find: Command: runScript Value: javascript{this.browserbot.getCurrentWindow().document.getElementById('hiddenElementId').value='TheValue'} 回答2: Late to the party... When you use the IDE, you can add the command type with target id=yourID and value field value , this seems to work. Copy the text below