Lec 2 || Maximizing Browser || Selenium-Java
In this tutorial you will learn how to maximize browser in selenium once after you have setup your selenium environment in eclipse IDE. Following are the steps to maximize a browser in selenium.
1. Create a Java Project.
2. Create a package.
3. Create a class.
4. follow the steps as mentioned in the program below.
Script
package seleniumQA;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Blogger {
public static void main(String[] args) {
// Set browser property
System.setProperty("webdriver.chrome.driver", "C:\\Users\\Arun Datt Kaushik\\Downloads\\Selenium\\chromedriver.exe");
// Open browser
WebDriver driver = new ChromeDriver();
driver.get("https://www.google.com");
// Maximize browser
}
}
Up Next
No comments:
Post a Comment