Steps for data driven testing with selenium IDE using push command

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 to

attach 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.

New Test
Command Target Value
setSpeed 500
getEval delete storedVars[‘MyArray’]
open http://www.google.com
push Acura MyArray
push Audi MyArray
push Bentley MyArray
push BMW MyArray
push Chevrolet MyArray
storeEval storedVars[‘MyArray’].length length
store 0 MyVar
while storedVars[‘MyVar’] < storedVars[‘length’]
storeEval storedVars.MyArray[${MyVar] carname
echo ${carname}
type id=gbqfq ${carname}
click id=gbqfba
pause 2000
store javascript{storedVars.MyVar++;}
endWhile

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.

6 thoughts on “Steps for data driven testing with selenium IDE using push command

  1. Hello

    Thank u for ur informative post.

    Can i get the link for the user extension which is to be used for Push command.

    Thanks & Regards,
    danikadain

  2. Thank you so much… i have downloaded and used ur extension file and now it works fine.

    Thanks again for the clear explanation and timely support.

  3. i would like to attach two files (selenium js files) in which i had some doubt to be clarified by u.

  4. Hi,

    thank you for the post.

    My program reads the line storedVars['MyVars'] < storedVars['length'] but nothing happens after that I think it goes into infinite loop.

    Please help to resolve this!

  5. thank you for the clear explanation but I am not able to proceed after this line –
    storedVars['MyVars'] < storedVars['length']
    It seems to read this line but nothing happens after that…
    Please help!

Leave a Reply

Your email address will not be published. Required fields are marked *