Manual input from user while running selenium IDE script

后端 未结 9 1371
死守一世寂寞
死守一世寂寞 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:05

    You could use the technique suggested here which uses the Selenium WebDriver and Java's BufferedReader. I don't think it can be adapted for Selenium IDE, but the technique should work fine with Selenium RC.

    The basic idea is:

    • Issue Selenium commands up to the point where you want to capture user input.
    • Call the following code to capture the user input to a BufferedReader.

      BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader.readLine();

    • Continue your Selenium commands

    (Note, if you are using C#, there is a discussion here on how to use Console.In.ReadLine(); instead of BufferedReader).

提交回复
热议问题