SUBSCRIBE HERE TO GET POST UPDATES VIA EMAIL :

Delivered by FeedBurner

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
CommandTargetValue
setSpeed500
getEvaldelete storedVars['MyArray']
openhttp://www.google.com
pushAcuraMyArray
pushAudiMyArray
pushBentleyMyArray
pushBMWMyArray
pushChevroletMyArray
storeEvalstoredVars['MyArray'].lengthlength
store0MyVar
whilestoredVars['MyVar'] < storedVars['length']
storeEvalstoredVars.MyArray[${MyVar]carname
echo${carname}
typeid=gbqfq${carname}
clickid=gbqfba
pause2000
storejavascript{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 comments:

  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

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

    ReplyDelete
    Replies
    1. can u pls advice how to link a file in this blog.

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

      Delete
  3. 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!

    ReplyDelete
  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!

    ReplyDelete