Skip to content

Instantly share code, notes, and snippets.

@ggeorgovassilis
Created March 13, 2018 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ggeorgovassilis/38b884c2e94e2e1b6fb84b7629381213 to your computer and use it in GitHub Desktop.
Save ggeorgovassilis/38b884c2e94e2e1b6fb84b7629381213 to your computer and use it in GitHub Desktop.
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.ie.InternetExplorerOptions;
import org.openqa.selenium.remote.DesiredCapabilities;
public class TestIE11 {
WebDriver browser;
@Before
public void setupBrowser() throws Exception {
DesiredCapabilities caps = DesiredCapabilities.internetExplorer();
caps.setCapability("ignoreZoomSetting", true);
InternetExplorerOptions options = new InternetExplorerOptions(caps);
browser = new InternetExplorerDriver(options);
}
@Test
public void testGooglePageTitleInIEBrowser() {
browser.navigate().to("http://www.google.com");
String strPageTitle = browser.getTitle();
System.out.println("Page title: - " + strPageTitle);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment