Closed kazurayam closed 10 months ago
Should I bring it into the inspectus
project?
No. It is not a good idea to move the com.kazurayam.inspectus.WebDriverFormulas
class into the inspectus
project.
Because the inspectus
project should not be dependent on Selenium at all. The inspectus
would only depend on the materialstore
plus some really generic libraries (gson, slft4j, ...).
Should I create 2 new projects?
Why?
v0.1.2, WebDriverFormulas has the following code:
import org.openqa.selenium.support.ui.WebDriverWait
...
public final void waitForElementPresent(WebDriver driver,
By handle,
int timeout) {
new WebDriverWait(driver, Duration.ofSeconds(timeout))
.until(ExpectedConditions.presenceOfElementLocated(handle));
}
This code compiles only with Selenium 4.
With Selenium 3, as [javadoc] tells, I have to change this to:
import org.openqa.selenium.support.ui.WebDriverWait
...
public final void waitForElementPresent(WebDriver driver,
By handle,
long timeout) {
new WebDriverWait(driver, timeout)
.until(ExpectedConditions.presenceOfElementLocated(handle));
}
Selenium 4 has a backward incompatibility to Selenum 3. I need to accept this.
I have no idea how to create one single project that can manage dependencies to Selenium3 and Selenium4 together.
So I will create 2 projects. OK?
Not yet. Think more.
Maybe I can hide the incompatibility of Selenium 3 & 4 using Java Reflection API.
Also I should change the package name:
com.kazurayam.inspectus.selenium
-> com.kazurayam.inspectus.support.selenium
Because the WebDriverFormula
class is not the first class citizen in the inspectus regime. It is just a by-product.
already there is
I believe that WebDriverForumulas class is worth sharing.
I should make a library to be used by other projects.