mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-16 09:11:02 +00:00
Merge remote-tracking branch 'origin/master' into ftes-mongo-driver-2.13
This commit is contained in:
commit
39c3c789b5
243 files changed
+39859
-1165
No files matched your search
+13
-3
@@ -1,8 +1,11 @@
|
||||
package com.sap.sailing.selenium.core;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.openqa.selenium.JavascriptExecutor;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
|
||||
import org.openqa.selenium.WebDriverException;
|
||||
import org.openqa.selenium.support.ui.ExpectedCondition;
|
||||
|
||||
/**
|
||||
@@ -14,6 +17,8 @@ import org.openqa.selenium.support.ui.ExpectedCondition;
|
||||
* D049941
|
||||
*/
|
||||
public class AjaxCallsComplete implements ExpectedCondition<Boolean> {
|
||||
private static final Logger logger = Logger.getLogger(AjaxCallsComplete.class.getName());
|
||||
|
||||
/**
|
||||
* <p>The key for the global category as defined in the class
|
||||
* <code>com.sap.sailing.gwt.ui.client.MarkedAsyncCallback</code>.</p>
|
||||
@@ -53,7 +58,12 @@ public class AjaxCallsComplete implements ExpectedCondition<Boolean> {
|
||||
@Override
|
||||
public Boolean apply(WebDriver driver) {
|
||||
JavascriptExecutor executor = (JavascriptExecutor) driver;
|
||||
|
||||
return (Boolean) executor.executeScript(JAVASCRIPT, this.category);
|
||||
boolean result = false;
|
||||
try {
|
||||
result = (Boolean) executor.executeScript(JAVASCRIPT, this.category);
|
||||
} catch (WebDriverException e) {
|
||||
logger.log(Level.WARNING, "Exception looking for PENDING_AJAX_CALLS variable. Telling caller that not all AJAX calls have finished yet.", e);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user