How to Generate Random Data Using Selenium Ide?

February 04, 2015

In my previous blog, I explained the process of fetching data from the XML , I believe I was able to strike the right note addressing the process.

In this blog, I would like to depict how to generate random values for the inputs, no file (xml, csv etc) to retrieve data.

Generating Random Email

Values Command Target
store javascript{“hello” + Math.floor(Math.random() * 1000) + “”;} email
echo k

 Generating Random Email Using Selenium Ide

 Generating Random Password

Values Command Target
store javascript{Math.random().toString(36).substring(2,8)} password
echo ${password}

 Generating Random Password Using Selenium Ide

The above example clearly illustrates the process of generating random emails and passwords. Now, let us go to an example that portrays how we can generate the values.

 Using the same example as in the last blog,

Generating Random Emails and Passwords Using Selenium Ide

 By using the JavaScript commands, we can create random emails and passwords, without entering any data we can directly Sign up to the form.

Like this we can create random data for the fields. Try other examples and find how its working.

Know More About This Topic from our Techies

What Are You Missing in Your Web Application Project and Why Do We Recommend Laravel
Why Laravel Application Development Is Not a Piece of Cake for Everyone
Why Are Web Applications Necessary for Emerging Businesses?
Creating animations in Flutter by using Rive
Flutter's Animation Support
Motion UI SaaS Library for Creating Flexible UI And Transitions

Latest Post

Get a free quote