Package com.crawljax.core

Examples of com.crawljax.core.CrawljaxException


    try {
      Document document = Helper.getDocument(browser.getPageSource());
      appendFrameContent(document.getDocumentElement(), document, "");
      return document;
    } catch (SAXException e) {
      throw new CrawljaxException(e.getMessage(), e);
    } catch (IOException e) {
      throw new CrawljaxException(e.getMessage(), e);
    }

  }
View Full Code Here


      File tmpfile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);

      try {
        FileHandler.copy(tmpfile, file);
      } catch (IOException e) {
        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

   *             this exception is always thrown when instanced.
   */
  private CrawljaxPluginsUtil() throws CrawljaxException {
    LOGGER.fatal("As this contructor is private and never used interal "
            + "in the CrawljaxPluginsUtil, this message may never appear");
    throw new CrawljaxException("Called private never used contructor CrawljaxPluginsUtil()");
  }
View Full Code Here

    try {
      JavascriptExecutor js = (JavascriptExecutor) browser;
      return js.executeScript(code);
    } catch (WebDriverException e) {
      throwIfConnectionException(e);
      throw new CrawljaxException(e);
    }
  }
View Full Code Here

    try {
      Document document = DomUtils.asDocument(browser.getPageSource());
      appendFrameContent(document.getDocumentElement(), document, "");
      return document;
    } catch (IOException e) {
      throw new CrawljaxException(e.getMessage(), e);
    }

  }
View Full Code Here

    try {
      File tmpfile = takeScreenShotOnBrowser(browser, OutputType.FILE);
      try {
        Files.copy(tmpfile, file);
      } catch (IOException e) {
        throw new CrawljaxException(e);
      }
    } catch (WebDriverException e) {
      throw wrapWebDriverExceptionIfConnectionException(e);
    }
  }
View Full Code Here

      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

    try {
      JavascriptExecutor js = (JavascriptExecutor) browser;
      return js.executeScript(code);
    } catch (WebDriverException e) {
      throwIfConnectionException(e);
      throw new CrawljaxException(e);
    }
  }
View Full Code Here

        }
      }
      document = Helper.getDocument(s);
      appendFrameContent(document.getDocumentElement(), document, "");
    } catch (SAXException e) {
      throw new CrawljaxException(e.getMessage(), e);
    } catch (IOException e) {
      throw new CrawljaxException(e.getMessage(), e);
    }

    return document;
  }
View Full Code Here

      File tmpfile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);

      try {
        FileHandler.copy(tmpfile, file);
      } catch (IOException e) {
        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

TOP

Related Classes of com.crawljax.core.CrawljaxException

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.