Package com.crawljax.core

Examples of com.crawljax.core.CrawljaxException


   */
  public static CrawljaxConfigurationBuilder builderFor(String url) {
    try {
      return new CrawljaxConfigurationBuilder(new URL(url));
    } catch (MalformedURLException e) {
      throw new CrawljaxException("Could not read that URL", e);
    }
  }
View Full Code Here


                        + "://" + encodedUsername
                        + ":" + encodedPassword + "@" + config.url.getAuthority()
                        + config.url.getPath());
        System.out.println("URL " + config.url);
      } catch (UnsupportedEncodingException | MalformedURLException e) {
        throw new CrawljaxException("Could not parse the username/password to a URL", e);
      }
      return this;
    }
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 {
        FileHandler.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

   */
  public static CrawljaxConfigurationBuilder builderFor(String url) {
    try {
      return new CrawljaxConfigurationBuilder(new URL(url));
    } catch (MalformedURLException e) {
      throw new CrawljaxException("Could not read that URL", e);
    }
  }
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

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.