Showing posts with label Extending Selenium IDE. Show all posts
Showing posts with label Extending Selenium IDE. Show all posts

JavaScript is the most important component of software web application. Developers generally using JavaScript to generate alert, to generate confirmation message, to handle client side validation etc.. If you will disable JavaScript of your browser then you will not get alert message or confirmation message or client side validation message on your action.

I hope you all are already aware about "selectWindow" command and all other previously published selenium IDE examples. If you have not viewed them then visit this link to view all examples step by step. I think "openMultipleWindow" command will be new for most of selenium IDE users. Yes because "openMultipleWindow" is not built in command of selenium IDE but we can get its support by attaching user extension file with selenium IDE.

"openMultipleWindow" command
First of all let me tell you function of "openMultipleWindow" command. It will open multiple windows as specified in target column of "openMultipleWindow" command. Value field will be used to set prefix window id of all new opened windows. Let me describe it with example.

Steps to download and install user extension file
First of all you need to copy user extension file code from this link.and paste it in text file and then save it as Userextension-openMultipleWindow.js on your hard drive. Now attach this file with selenium IDE as user extension to get support of "openMultipleWindow" command. This link will show you the steps of attaching user extension files with selenium IDE if you don't know. After attaching user extension file with selenium IDE, restart selenium IDE window.

"openMultipleWindow" Example
I have created one simple example of "openMultipleWindow" command as bellow to understand it. Run it in your selenium IDE. This example will open 2 windows and then it will show you how to operate on both of windows. However you can view examples of other methods to handle multiple windows in selenium IDE.

New Test
CommandTargetValue
openMultipleWindow2prefix=
mywindow
selectWindowmywindow1
openhttp://only-testing-blog.blogspot.com
/2013/10/table.html

selectWindowmywindow2
openhttp://only-testing-blog.blogspot.com
/2013/09/testing.html

selectWindowmywindow1
runScriptjavascript{alert("mywindow1
is selected and selenium will do
some action on it.")}

highlightname=fname
pause2000
typename=fname1st
Window
pause2000
selectWindowmywindow2
runScriptjavascript{alert("mywindow2
is selected and selenium will
do some action on it.")}

highlightname=fname
pause2000
typename=fname2nd
Window
pause2000
runScriptjavascript{alert("Now Selenium will
close both the windows")}

closeMultipleWindow2mywindow

You can try above example with more than 2 windows with your software application.

Parameterization in selenium IDE using data.js file is described with example in my previous post. You must have Advanced Selenium IDE knowladge for Parameterization in selenium IDE. Now Parameterization using "push" command is another way of data driven testing in selenium IDE for your software web application regression of functional testing. Please note, "push" command is not supported by default in selenium IDE so you need to attach (Click here for how to


As described in my previous post("while" and "endWhile" commands with example), selenium IDE software testing tool not supporting any conditioning and looping commands and to get support of "gotoif" "gotoLabel" and "label" commands, you have to attach user extension with selenium IDE software automation testing tool. This is Advanced Selenium IDE feature. Click here to download user extension and attach it with selenium IDE and restart selenium IDE software testing tool's window. Now you can use "gotoif" "gotoLabel" and "label" commands with selenium IDE software automation.

How to use "while" and "endWhile" command in selenium IDE software testing tool
"while" command is not supported by default in selenium IDE software automation testing tool. Selenium IDE also not supporting any conditional(if condition) commands by default. To get support of "while" loop as a Advanced Selenium IDE feature, You need to attach user extension with selenium IDE software testing tool. You can read my post about how to attach user extension with selenium IDE.

I shared user extension file for "while" loop command. Click here to download selenium IDE user extension file for "while" and "endWhile" Commands and save it in your hard drive(only in .js format)