Package org.openqa.selenium.remote

Examples of org.openqa.selenium.remote.Augmenter


    if (driver instanceof TakesScreenshot) {
      T screenshot = ((TakesScreenshot) driver).getScreenshotAs(outType);
      removeCanvasGeneratedByFirefoxDriverForScreenshots();
      return screenshot;
    } else if (driver instanceof RemoteWebDriver) {
      WebDriver augmentedWebdriver = new Augmenter().augment(driver);
      return takeScreenShotOnBrowser(augmentedWebdriver, outType);
    } else if (driver instanceof WrapsDriver) {
      return takeScreenShotOnBrowser(((WrapsDriver) driver).getWrappedDriver(), outType);
    } else {
      throw new CrawljaxException("Your current WebDriver doesn't support screenshots.");
View Full Code Here


        throw new CrawljaxException(e);
      }

      removeCanvasGeneratedByFirefoxDriverForScreenshots();
    } else if (driver instanceof RemoteWebDriver) {
      WebDriver augmentedWebdriver = new Augmenter().augment(driver);
      takeScreenShotOnBrowser(augmentedWebdriver, file);
    } else if (driver instanceof WrapsDriver) {
      takeScreenShotOnBrowser(((WrapsDriver) driver).getWrappedDriver(), file);
    } else {
      throw new CrawljaxException("Your current WebDriver doesn't support screenshots.");
View Full Code Here

    if (webdriver instanceof TakesScreenshot) {
      targetFile = takeScreenshotImage((TakesScreenshot) webdriver, fileName, targetFile);
    }
    else if (webdriver instanceof RemoteWebDriver) {
      WebDriver remoteDriver = new Augmenter().augment(webdriver);
      if (remoteDriver instanceof TakesScreenshot) {
        targetFile = takeScreenshotImage((TakesScreenshot) remoteDriver, fileName, targetFile);
      }
    }
View Full Code Here

  protected File savePageImageToFile(String fileName, WebDriver webdriver) {
    File imageFile = null;
    if (webdriver instanceof TakesScreenshot) {
      imageFile = takeScreenshotImage((TakesScreenshot) webdriver, fileName);
    } else if (webdriver instanceof RemoteWebDriver) {
      WebDriver remoteDriver = new Augmenter().augment(webdriver);
      if (remoteDriver instanceof TakesScreenshot) {
        imageFile = takeScreenshotImage((TakesScreenshot) remoteDriver, fileName);
      }
    }
    return imageFile;
View Full Code Here

    if (driver instanceof TakesScreenshot) {
      T screenshot = ((TakesScreenshot) driver).getScreenshotAs(outType);
      removeCanvasGeneratedByFirefoxDriverForScreenshots();
      return screenshot;
    } else if (driver instanceof RemoteWebDriver) {
      WebDriver augmentedWebdriver = new Augmenter().augment(driver);
      return takeScreenShotOnBrowser(augmentedWebdriver, outType);
    } else if (driver instanceof WrapsDriver) {
      return takeScreenShotOnBrowser(((WrapsDriver) driver).getWrappedDriver(), outType);
    } else {
      throw new CrawljaxException("Your current WebDriver doesn't support screenshots.");
View Full Code Here

  protected File savePageImageToFile(String fileName, WebDriver webdriver) {
    File imageFile = null;
    if (webdriver instanceof TakesScreenshot) {
      imageFile = takeScreenshotImage((TakesScreenshot) webdriver, fileName);
    } else if (webdriver instanceof RemoteWebDriver) { // TODO Remove this obsolete branch
      WebDriver remoteDriver = new Augmenter().augment(webdriver);
      if (remoteDriver instanceof TakesScreenshot) {
        imageFile = takeScreenshotImage((TakesScreenshot) remoteDriver, fileName);
      }
    }
    return imageFile;
View Full Code Here

  protected File getPageImage(WebDriver webdriver) {
    File scrFile = null;
    if (webdriver instanceof TakesScreenshot) {
      scrFile = takeScreenshotInMemory((TakesScreenshot) webdriver);
    } else if (webdriver instanceof RemoteWebDriver) { // TODO Remove this obsolete branch
      WebDriver remoteDriver = new Augmenter().augment(webdriver);
      if (remoteDriver instanceof TakesScreenshot) {
        scrFile = takeScreenshotInMemory((TakesScreenshot) remoteDriver);
      }
    }
    return scrFile;
View Full Code Here

        } else if (browserStackUrlIsDefined()){
          driver = buildBrowserStackDriver();
        } else {
            driver = buildRemoteDriver();
        }
        Augmenter augmenter = new Augmenter();
        return augmenter.augment(driver);
    }
View Full Code Here

        throw new CrawljaxException(e);
      }

      removeCanvasGeneratedByFirefoxDriverForScreenshots();
    } else if (driver instanceof RemoteWebDriver) {
      WebDriver augmentedWebdriver = new Augmenter().augment(driver);
      takeScreenShotOnBrowser(augmentedWebdriver, file);
    } else if (driver instanceof WrapsDriver) {
      takeScreenShotOnBrowser(((WrapsDriver) driver).getWrappedDriver(), file);
    } else {
      throw new CrawljaxException("Your current WebDriver doesn't support screenshots.");
View Full Code Here

  protected File savePageImageToFile(String fileName, WebDriver webdriver) {
    File imageFile = null;
    if (webdriver instanceof TakesScreenshot) {
      imageFile = takeScreenshotImage((TakesScreenshot) webdriver, fileName);
    } else if (webdriver instanceof RemoteWebDriver) {
      WebDriver remoteDriver = new Augmenter().augment(webdriver);
      if (remoteDriver instanceof TakesScreenshot) {
        imageFile = takeScreenshotImage((TakesScreenshot) remoteDriver, fileName);
      }
    }
    return imageFile;
View Full Code Here

TOP

Related Classes of org.openqa.selenium.remote.Augmenter

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.