Posts

Showing posts with the label FirefoxDriver

WebDriver | Automation | launch/Execute on different version of Firefox

Image
Run tests on specific Firefox version | Selenium Firefox binary Imagine a situation where you have to test your web application against two different versions of the Firefox browser. By default, when you instantiate FirefoxDriver, the Firefox version that is available on the PATH variable is launched. But if you want to launch a different version of Firefox, we need to use Firefox Binary. For this first steps you have to install all the versions of Firefox which you want to test on your system. Make sure the installed Firefox versions on different path locations using Custom installation Installing multiple versions of Firefox Suppose you have already installed the Firefox( version 22 ) means default Firefox is already installed. this can be found on your program file location like this.. "C:\Program Files (x86)\Mozilla Firefox" Now we have to install another Firefox version (lets take Firefox version 23 ). 1. Download this version from Mozilla s...

How to handle login pop up window using Selenium WebDriver?

Image
Hi All, Some times while using webdriver we have to face login popup handle.  When we passing the url using webdriver.get or webdriver.navigate.to("URL") at this time browser asks for login credentials. For handle this situation we have to do following things. 1. HTTP Basic Authentication with Selenium WebDriver the authentication prompt is not available from the Selenium WebDriver. One of the way to handle this limitation is to pass user and password in the url like like below: http://username:password@the-site.com So just to make it more clear. The username is  username  password is  password  and the rest is usual URL of your test web WebDriver driver = getDriver(); String URL = "http://" + username + ":" + password + "@" + "link"; driver.get(URL); but sometimes it does not work for IE browser  we can use robot  method import java.awt.Robot; import java.awt.Toolkit; import java.a...

Selenium Webdriver 2 Wait /Sleep for time period/wait next step execution/ Set speed for next execution

Some times we have to wait while running the script like for next execution wait for specific duration.But in web driver 2, I did not find the simple way to wait for next step execution after that I have decided to use simplest way to wait in looping statement. I have created a method just call the method with waiting time in seconds.It will wait for given time period.