Earn Money in 10 days

Selenium Videos

Protractor In Selenium

Livechat

Saturday, 8 November 2014

How to Open Internet Explorer browser using Selenium

                       How to open Browser in Internet Explorer

             

After Running this You will get a error if you haven't set System Properties For Internet Explorer.

                   
For Resolving this you need to download Internet Explorer driver Excecutable on your system.Why you need This??InternetExplorerDriver is a standalone server which implements WebDriver’s wire protocol.You need to install the driver servers on your browser. The driver server manages the calls between the browsers and the Selenium wire protocol.Download DriverServer from Here 
Download this according to to operating system.For 32-bit Click on 32.For 64 Click on 64bit....Now Next step is to set SystemProperty.And launch your ie browser.Just you need to give the path where you download that IEDriver.exe.Don't Run this exe file.Just give that path.


Code for Internet Explorer
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
public class LaunchIntrntBrowser {
public static void main(String[] args) {
System.setProperty("webdriver.ie.driver","YourIEpath");
System.setProperty("webdriver.ie.driver","D:\\frustate\\IEDriverServer.exe");
WebDriver  driver = new  InternetExplorerDriver();
driver.get("http://facebook.com");
}
}

This will launch Internet Browser browser successfully.

0 comments:

Post a Comment

Popular Posts

 
subscribe
Subscribe Us
emailSubscribe to our mailing list to get the updates to your email inbox... We can't wait more to have your email in our subscribers email list. Just put your nice email in below box: