Friday, 10 February 2012

Selenium IDE - parameterization

For parameterization you need to create js file
For eg. Js file contains
  var username=new Array("","");
  var password=new Array("parameterization1","parameterization2");

Sample script for parameterization


  1. I tried above example and added user extensions : data.js and goto_sel_ide.js file for while loop .But the test case doesn't run

  2. Which user extension we should be adding for while loop ?

  3. Are you getting any error??
    The same extension will be used for while loop..

  4. [info] Executing: |store | 0 | looptimes |
    [info] Executing: |while | storedVars.looptimes <=1 | |
    [error] Unknown command: 'while'
    i hanged here, it is not identifying while command, Please help us.

  5. For while command you need extension - goto_sel_ide.js file, you can get it from

  6. I want to use loadTestData command from which extension I can get this.

  7. Also for Data Driven testing I tried installing flow-control, include4d and data driven extensions but I am getting exception error. Please help me out on this.

  8. Great job, thanks, it helped me a lot :)

  9. How do I do exactly for parameterization in IDE?

  10. For parameterization, I want to get the values from excel or csv file, how can i get it in Selenium IDE. ??

  11. Can anyone suggest that how to do parameterization in sel ide?
    I want to pass 2 or more id for login.
    Is this possible?

    Thanks in advance!!!

    1. Post itself gives idea about parametrization..Please have a look in detail.

  12. HI,

    I tried using the same code but Selenium hangs on running the script and added data.js and goto_sel_ide.js. But the script gets stuck in the start. The Debug levels logs are as follows. Please can u help me on how to resolve this issue

    [debug] createForWindow
    [debug] browserName: Netscape
    [debug] userAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
    [debug] modifyWindow seleniumMarker1386241082634:undefined
    [debug] _getFrameElement: frameElement=null
    [debug] isPollingForLoad false, this.pollingForLoad[1]: undefined
    [debug] Starting pollForLoad (selenium1386241082635):
    [debug] _getFrameElement: frameElement=null
    [debug] pollForLoad original (selenium1386241082635):
    [debug] _isSamePage: currentHref:
    [debug] _isSamePage: originalHref:
    [debug] _isSamePage: sameDoc: true
    [debug] _isSamePage: sameLoc: true
    [debug] _isSamePage: sameHref: true
    [debug] _isSamePage: markedLoc: true
    [debug] pollForLoad continue (selenium1386241082635): undefined
    [debug] modifyWindow seleniumMarker1386241082634:undefined
    [debug] _getFrameElement: frameElement=[object HTMLIFrameElement]
    [debug] isPollingForLoad false, missing uniqueId seleniumMarker1386241082634: undefined
    [debug] Starting pollForLoad (selenium1386241082642):
    [debug] _getFrameElement: frameElement=[object HTMLIFrameElement]
    [debug] modifySeparateTestWindowToDetectPageLoads: this window is a frame; attaching a load listener
    [debug] dgf this.uniqueId=seleniumMarker1386241082634
    [debug] dgf marker=selenium1386241082642
    [debug] dgf frameElement['frame'+this.uniqueId]=selenium1386241082642
    [debug] dgf frameElement[this.uniqueId]=selenium1386241082642
    [debug] getCurrentWindow newPageLoaded = false

  13. Threw an exception: username is not defined

    Am getting above error .. Is anyone help me ?

  14. Have you uploaded JS file with required input?
    Please check initial part of Post for reference.

  15. HI,
    I have modified the code for more than 2 users when the user log-in the page; each user has different contents specified for it.Using the above code data.js and goto_sel_ide.js. It only considers 1st user skips the rest ,it is stuck in loop keeps showing user1 log-in.Could you please advise what can be done here.