Package org.openqa.selenium

Examples of org.openqa.selenium.Dimension


    public void manipulateWindowMaximize() {
        WebDriver d = getDriver();

        d.get("http://www.google.com");

        Dimension sizeBefore = d.manage().window().getSize();
        d.manage().window().maximize();
        Dimension sizeAfter = d.manage().window().getSize();

        assertTrue(sizeBefore.width <= sizeAfter.width);
        assertTrue(sizeBefore.height <= sizeAfter.height);
    }
View Full Code Here


  public String static_info() {
    String info = "";
    Point point = getLocation();
    info += "X = " + point.getX();
    info += ", Y = " + point.getY();
    Dimension dimension = getSize();
    info += ", Height = " + dimension.getHeight();
    info += ", Width = " + dimension.getWidth();
    return info;
  }
View Full Code Here

    return new Point(0, 0);
  }

  public Dimension getSize() {
    if(is_not_null(_webElement)) {
      Dimension value = _webElement.getSize();
      info("Element '" + super.name() + "' - Dimention is '" + value + "'");
      return value;
    } else {
      info("Element '" + super.name() + "' - has a null _webelement, cannot do getSize()");
    }
    return new Dimension(0, 0);
  }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.Dimension

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.