Parameterization in selenium IDE using data.js file is described with example in my previous post. You must have Advanced Selenium IDE knowladge for Parameterization in selenium IDE. Now Parameterization using "push" command is another way of data driven testing in selenium IDE for your software web application regression of functional testing. Please note, "push" command is not supported by default in selenium IDE so you need to attach (Click here for how toattach user extension with selenium IDE) user extension with selenium IDE to extend functionality of selenium IDE. Please don't forget to restart selenium IDE after attaching user extension with selenium IDE.
Now create bellow given test case in your selenium IDE.
|while||storedVars['MyVar'] < storedVars['length']|
Run above test in selenium IDE and look command execution carefully. Only difference between both the parameterization method is - in 1st example (Described in previous post), "storeEval" command was reading value from array 'carnamearray' located in data.js file. While in above example, First of all "push" command will fill array (MyArray) and then "storeEval" command will read value from array one by one.
- Here, initial "getEval" command will delete all values from variable array 'Pusharray' if there is any.
- "push" command will fill array 'MyArray' with car names (Acura,Audi,Bentley,BMW,Chevrolet)
- All the remaining commands will works same as described in 1st method of parameterization for software testing using selenium IDE.