'Passing variable to pause command in Selenium IDE

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


Solution 1:[1]

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

Example:
Selenium IDE script with pauseBetween as variable

Solution 2:[2]

This question is a bit old now but here goes anyway.

I find I have to store as variable

{
      "id": "bbbb21d6-4fab-42df-bdd9-896e94bd4d59",
      "comment": "",
      "command": "executeScript",
      "target": "return (${i} * 100)",
      "targets": [],
      "value": "pausems"
    },

Then when to use in the pause command, don't use the ${VariableName} syntax, but instead reference the variable as follows; 'vars.VariableName'

 {
      "id": "b65554de-c1f2-494d-bad0-935247b6febc",
      "comment": "",
      "command": "pause",
      "target": "vars.pausems",
      "targets": [],
      "value": ""
    },

Solution 3:[3]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Peter Gfader
Solution 2 Mick P
Solution 3 Stephen B.