Manual input from user while running selenium IDE script

后端 未结 9 1498
死守一世寂寞
死守一世寂寞 2021-02-05 19:50

can user is able to give manual input while running selenium IDE script? For ex. If there is name field then can we open input box everytime script runs so that user can give hi

9条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-05 20:00

    You can use the following script to invoke a javascript prompt in order to get the value

    
        storeEval
        prompt("Please enter your FirstName")
        firstName
    
    

    Then accessing the value is a case of using ${firstName}.

    EDIT: Since Selenium IDE 2.5.0, the script needs to look like this:

    
        storeEval
        javascript{prompt("Please enter your FirstName")}
        firstName
    
    

提交回复
热议问题