From 69c377553bdfbc1b8f51fc4637d80bc8a2fb1149 Mon Sep 17 00:00:00 2001 From: Valery Yatsynovich Date: Thu, 9 Aug 2018 17:03:25 +0300 Subject: [PATCH] Upgrade to Selenium 3.14.0 Selenium deprecated a set of interfaces and switched internally to new types. It broke compatibility of jBrowserDriver with Selenium 3.14.+ and requires version update. --- pom.xml | 2 +- src/com/machinepublishers/jbrowserdriver/Element.java | 6 ++++-- src/com/machinepublishers/jbrowserdriver/Util.java | 2 +- .../machinepublishers/jbrowserdriver/diagnostics/Test.java | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 567208f8..78f8c08f 100644 --- a/pom.xml +++ b/pom.xml @@ -34,7 +34,7 @@ UTF-8 - 3.8.1 + 3.14.0 diff --git a/src/com/machinepublishers/jbrowserdriver/Element.java b/src/com/machinepublishers/jbrowserdriver/Element.java index 1684e475..5cd95274 100644 --- a/src/com/machinepublishers/jbrowserdriver/Element.java +++ b/src/com/machinepublishers/jbrowserdriver/Element.java @@ -29,7 +29,7 @@ import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; -import org.openqa.selenium.interactions.internal.Locatable; +import org.openqa.selenium.interactions.Locatable; import org.openqa.selenium.internal.FindsByClassName; import org.openqa.selenium.internal.FindsByCssSelector; import org.openqa.selenium.internal.FindsById; @@ -37,10 +37,12 @@ import org.openqa.selenium.internal.FindsByName; import org.openqa.selenium.internal.FindsByTagName; import org.openqa.selenium.internal.FindsByXPath; -import org.openqa.selenium.internal.WrapsDriver; +import org.openqa.selenium.WrapsDriver; class Element implements WebElement, JavascriptExecutor, FindsById, FindsByClassName, FindsByLinkText, FindsByName, FindsByCssSelector, FindsByTagName, FindsByXPath, Locatable, + org.openqa.selenium.interactions.internal.Locatable, // Selenium 3.14 API (org.openqa.selenium.interactions.Actions) uses deprecated interface internally, + // so we should implement it as well to avoid type casting issues. WrapsDriver { private final ElementRemote remote; private final JBrowserDriver driver; diff --git a/src/com/machinepublishers/jbrowserdriver/Util.java b/src/com/machinepublishers/jbrowserdriver/Util.java index 2f91950c..2eccbb75 100644 --- a/src/com/machinepublishers/jbrowserdriver/Util.java +++ b/src/com/machinepublishers/jbrowserdriver/Util.java @@ -37,7 +37,7 @@ import org.apache.commons.lang.RandomStringUtils; import org.apache.http.ConnectionClosedException; import org.openqa.selenium.WebDriverException; -import org.openqa.selenium.internal.WrapsElement; +import org.openqa.selenium.WrapsElement; import com.google.common.util.concurrent.UncheckedExecutionException; diff --git a/src/com/machinepublishers/jbrowserdriver/diagnostics/Test.java b/src/com/machinepublishers/jbrowserdriver/diagnostics/Test.java index c1dcc120..1dd5ef5d 100644 --- a/src/com/machinepublishers/jbrowserdriver/diagnostics/Test.java +++ b/src/com/machinepublishers/jbrowserdriver/diagnostics/Test.java @@ -46,7 +46,7 @@ import org.openqa.selenium.WebDriverException; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.Actions; -import org.openqa.selenium.interactions.internal.Locatable; +import org.openqa.selenium.interactions.Locatable; import org.openqa.selenium.logging.LogEntry; import com.machinepublishers.jbrowserdriver.JBrowserDriver;