Skip to content

Selenium IDE: bad practices of lazy test engineer

December 26, 2015

Once upon a time it was nothing serious to do. So let’s find out how QA engineers without good programming skills can use the power of Selenium. Surely you know about Selenium IDE Firefox browser plugin. It is useful for simple automation routine. But what if you need to run tests with various parameters? Loop around array? So then search helped me to find out the following.

It is possible to write extensions for execution while statement. Let’s do it, add an extension to Selenium IDE. Run Selenium IDE browser plugin, go to plugin options and add Selenium Core extensions:

Selenium_IDE_2.9.0_and_Selenium_IDE_-_Understanding_General_Settings_Of_Options_Window

To get while extension javaScript go to my public gist https://gist.github.com/tjlee/d531319231fbcbd41027 and save it.

Further magic, how to implement while loop in Selenium IDE table context?

t__untitled_suite__-_Selenium_IDE_2.9.0_and_Add_New_Post_‹_QA_Questions_—_WordPress

In more detail, see example:

New Test
Command Target Value
storeEval new Array(“car”,”truck”, “Bus”, “motorcycle”, “bicycle”); vehicles
getEval myitems=0;
while myitems < storedVars[‘vehicles’].length
storeEval myitems myvar
echo javascript{storedVars[‘vehicles’][storedVars[‘myvar’]]}
getEval myitems++;
endWhile

 

So use such strange manipulations one can implement while loop in Selenium IDE plugin.

Advertisements

From → Automation, Selenium

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: