Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium IDE: How to Pass Variables

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,

like image 948
donald Avatar asked Jul 21 '12 00:07

donald


1 Answers

You can go with parameterization

For parameterization you need to create js file

For eg. Js file contains

var username = ["[email protected]", "[email protected]");
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

like image 152
Rohit Ware Avatar answered Oct 30 '22 14:10

Rohit Ware