Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
seanf committed Feb 26, 2015
1 parent a83084c commit 071d3b0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
Expand Up @@ -222,6 +222,8 @@ public boolean apply(WebDriver input) {
// if we get here, the old page is still there
return false;
} catch (StaleElementReferenceException e) {
// http://www.obeythetestinggoat.com/how-to-get-selenium-to-wait-for-page-load-after-a-click.html
//
// This exception means the new page has loaded
// (or started to).
String script = "return document.readyState === " +
Expand Down
9 changes: 0 additions & 9 deletions functional-test/src/main/java/org/zanata/page/CorePage.java
Expand Up @@ -126,15 +126,6 @@ public boolean apply(WebDriver input) {
*/
public List<String> expectErrors() {
waitForPageSilence();
String msg = "an error message";
logWaiting(msg);
// waitForAMoment().withMessage(msg).until(new Predicate<WebDriver>() {
// @Override
// public boolean apply(WebDriver input) {
// List<String> errors = getErrors();
// return !errors.isEmpty();
// }
// });
return getErrors();
}

Expand Down
Expand Up @@ -91,14 +91,22 @@ private String[] getLogTypes() {
};
}

/**
* Retrieves all the outstanding WebDriver logs of the specified type.
* @param type a log type from org.openqa.selenium.logging.LogType
* (but they don't all seem to work)
*/
public LogEntries getLogs(String type) {
JavascriptExecutor exec = (JavascriptExecutor) getDriver();
exec.executeScript("console.log('Hello');");
Logs logs = getDriver().manage().logs();
LogEntries logEntries = logs.get(type);
return logEntries;
}

/**
* Logs all the outstanding WebDriver logs of the specified type.
* @param type a log type from org.openqa.selenium.logging.LogType
* (but they don't all seem to work)
*/
public void logLogs(String type) {
String logName = WebDriverFactory.class.getName() + "." + type;
Logger log = LoggerFactory.getLogger(logName);
Expand Down

0 comments on commit 071d3b0

Please sign in to comment.