12

I have 3 different accounts in a website that I want to login and print a report every single day.

I've done a Selenium IDE recording that allows me to login and print the report, however, every day I have to change the variable 3 times (for the 3 different usernames and passwords).

How can I pass a variable to the "value" field of the "type" command?

Thank you.

Best,

Rohit Ware
  • 1,982
  • 1
  • 13
  • 29
donald
  • 23,587
  • 42
  • 142
  • 223

2 Answers2

16

You can go with parameterization

For parameterization you need to create js file

For eg. Js file contains

var username = ["parameterization1@mailinator.com", "parameterization2@mailinator.com");
var password = ["parameterization1", "parameterization2"];

You can upload this JS file to Options > Options... > General tab > Selenium IDE extension.

Sample script for parameterization

enter image description here

Hendy Irawan
  • 20,498
  • 11
  • 103
  • 114
Rohit Ware
  • 1,982
  • 1
  • 13
  • 29
  • 2
    `while` is not a native Selenium command. Is this using the [SelBlocks](https://addons.mozilla.org/en-US/firefox/addon/selenium-ide-sel-blocks/) extension? – Chris Noe Jan 07 '15 at 12:48
-6

Try this way of using Selenium IDE - http://greenlanternautomationframework.blogspot.com/p/selenium-ide.html

Srilu
  • 423
  • 4
  • 4
  • 6
    welcome to stackoverflow! that's a long page in the link, it would be better if you could summarize the part that is relevant to the question. – Corley Brigman Oct 18 '13 at 12:56
  • The link is dead by now - maybe having a summary would solve the problem :) – ggonmar Nov 09 '20 at 09:46