Selenium Scripts : How to resize current browser window in Selenium WebDriver

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);
      }
  }
Selenium Scripts,Resize Browser


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:

Related Posts Plugin for WordPress, Blogger...