1
votes

How can I pass variable to pause command and use this variable with pause command in other parts of test suite in Selenium IDE? I want to define time variable at the begining of test suite and use that time variable in other parts of test suite like following.

pause $variable
2

2 Answers

1
votes

Init variable via "store" command. Attention: Value = variablename
Read variable via ${variablename}

Example:
Selenium IDE script with pauseBetween as variable

0
votes

Your question centers more around method parameters, scope, and access within your program which are not Selenium specific. That being said, you should go look at some tutorials on Java, here.

With regards to creating a Pause class, you will want to look at the Robot class, here.

But, be warned, using Robot to accommodate delays in the web page loading is a hack at best and prone to failure. I suggest you investigate implicit waits and using Robot only as a buffer or a last resort.

Waits are explained here.