Both "assertSelectedLabel" and "assertSelectedValue" are selenium IDE assertion commands. Both are working with list box and drop down. Some people thinking that both of them are same and i also received some requests from my blog reader to describe the difference between both of them. So, Let me try here to show you clear difference between both these commands.
A blog on Selenium tutorial, Selenium webdriver tutorial, Selenium IDE tutorial, Appium Tutorial, Selenium Grid Tutorial, Jmeter Tutorial.
Selenium IDE "verifyConfirmation" and "assertConfirmation" Command Examples
Before reading this post about "verifyConfirmation" and "assertConfirmation" Command example, you must have to look at other verification Command and Assertion Command examples. "verifyConfirmation" and "assertConfirmation" both are working with confirmation message generated during previous action by selenium IDE. Click here to read - difference between "assert" and "verify" in selenium with examples. Let me describe "verifyConfirmation" and "assertConfirmation" commands with examples.
Selenium IDE- Using "openMultipleWindow" command and handle multiple windows
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 | ||
Command | Target | Value |
openMultipleWindow | 2 | prefix= mywindow |
selectWindow | mywindow1 | |
open | http://only-testing-blog.blogspot.com /2013/10/table.html | |
selectWindow | mywindow2 | |
open | http://only-testing-blog.blogspot.com /2013/09/testing.html | |
selectWindow | mywindow1 | |
runScript | javascript{alert("mywindow1 is selected and selenium will do some action on it.")} | |
highlight | name=fname | |
pause | 2000 | |
type | name=fname | 1st Window |
pause | 2000 | |
selectWindow | mywindow2 | |
runScript | javascript{alert("mywindow2 is selected and selenium will do some action on it.")} | |
highlight | name=fname | |
pause | 2000 | |
type | name=fname | 2nd Window |
pause | 2000 | |
runScript | javascript{alert("Now Selenium will close both the windows")} | |
closeMultipleWindow | 2 | mywindow |
You can try above example with more than 2 windows with your software application.
Selenium IDE - "runScript" Command example to generate alert including variable value
In my previous post, I described how to generate alert message using "runScript" command in selenium IDE. In this example, Let we see how can we show variable value inside alert using "runScript" command. Copy paste bellow given example in your selenium IDE and run it.
Example 2 : "runScript" Command With Variable In Script
Selenium IDE - How to use "runScript" command in different ways with examples
Many blog readers were asking me for "runScript" command examples. Finally i got some time to prepare few examples for "runScript" command. There is not one specific use of "runScript" command but we can use it in different ways for different conditions. BTW, you can Look at different examples of using javascript with selenium IDE.
Tutorial post for selenium IDE "waitForTitle" and "waitForNotTitle" commands
Selenium IDE is open source regression testing tool and has many different commands for controlling regression testing flow of your software web application and I am trying to write tutorial posts for all the selenium ide commands. "waitForTitle" and "waitForNotTitle" command are one of them and are works with title of software web application. There are many other "waitFor" and other commands available in selenium
Related Articles :
selenium ide,
selenium IDE tutorial,
Waitfor Commands,
waitForNotTitle Command,
waitForTitle Command
Subscribe to:
Posts (Atom)