Resize the browser window in Selenium Webdriver
Script 1:-
package selenium_examples;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.Dimension;
public class spicejet {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://funandknowledge.blogspot.com");
Dimension D = new Dimension(800,500);
driver.manage().window().setSize(D);
}
}
Script 2:-
package selenium_examples;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.Dimension;
public class spicejet {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://google.com");
Dimension D = new Dimension(500,800);
driver.manage().window().setSize(D);
}
}
Script 1:-
package selenium_examples;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.Dimension;
public class spicejet {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://funandknowledge.blogspot.com");
Dimension D = new Dimension(800,500);
driver.manage().window().setSize(D);
}
}
Script 2:-
package selenium_examples;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.Dimension;
public class spicejet {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.get("http://google.com");
Dimension D = new Dimension(500,800);
driver.manage().window().setSize(D);
}
}
No comments:
Post a Comment