I'm develping Selenium tests for ADF application.
I'm using for that:
- JDeveloper fmw_12.2.1.3.0_bpmqs installation
- Very usefull library SelniumTools https://github.com/adfemg/adf-selenium
And I faced with problem:
The SelniumTools based on adf-richclient-automation-11.jar which is distributed with JDeveloper (use can find it in Oracle_Home\oracle_common\modules\oracle.adf.view\ folder) and described in docs as Oracle Customized Selenium.
And everything works fine with selenium-java library up to 2.53.1 version.
But when I upgrade selenium-java library to 3.3.1 version my test project fall with exception:
- org.openqa.selenium.WebDriverException: java.lang.NoSuchMethodError: org.openqa.selenium.support.ui.WebDriverWait.until(Lcom/google/common/base/Function;)Ljava/lang/Object; Build info: version: 'unknown', revision: '5234b32', time: '2017-03-10 09:00:17 -0800' System info: host: 'EE-LATITUDE-749', ip: '10.10.207.64', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_172' Driver info: driver.version: unknown
- com.redheap.selenium.junit.PageProvider.createPage(PageProvider.java:49)
- com.redheap.selenium.junit.PageProvider.goHome(PageProvider.java:36)
- ru.russvet.selenium.tests.P6_ProcessPageTest.(P6_ProcessPageTest.java:38)
- java.lang.reflect.Constructor.newInstance(Constructor.java:423)
- Caused by: java.lang.NoSuchMethodError: org.openqa.selenium.support.ui.WebDriverWait.until(Lcom/google/common/base/Function;)Ljava/lang/Object;
- oracle.adf.view.rich.automation.selenium.RichWebDrivers.waitForServer(RichWebDrivers.java:112)
- oracle.adf.view.rich.automation.selenium.RichWebDrivers.waitForRichPageToLoad(RichWebDrivers.java:175)
- oracle.adf.view.rich.automation.selenium.RichWebDrivers.waitForRichPageToLoad(RichWebDrivers.java:158)
- com.redheap.selenium.page.Page.(Page.java:53)
- com.redheap.selenium.page.Page.(Page.java:45)
- ru.russvet.selenium.pages.BPMWorkspaceLoginPage.(BPMWorkspaceLoginPage.java:19)
- com.redheap.selenium.junit.PageProvider.createPage(PageProvider.java:47)
Investigations follow to the reason:
1) in selenium-java library starting from 3.3.1 interface for until function has been changed and accept Function, Predicate или Supplier classes from Java 8 library instead of Guava library https://github.com/SeleniumHQ/selenium/commit/b2aa9fd534f7afbcba319231bb4bce85f825ef09 :
-import com.google.common.base.Function;
-import com.google.common.base.Predicate;
-import com.google.common.base.Supplier;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.function.Supplier;
2) With recent guava release (21+ version) the Google versions of both Function and Predicate extend the Java 8 equivalents
So, it is look like that adf-richclient-automation-11.jar is built with selenium-java library 2.x, and that causes the exception during running the tests.
My question is how to get\rebuild the official oracle adf-richclient-automation-11.jar compatible with the latest version of selenium-java https://raw.githubusercontent.com/SeleniumHQ/selenium/master/java/CHANGELOG ?