diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
index c595b00..216df05 100644
--- a/.mvn/wrapper/maven-wrapper.properties
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -1,3 +1,3 @@
wrapperVersion=3.3.4
distributionType=only-script
-distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.14/apache-maven-3.9.14-bin.zip
+distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0f7635c..723e2b2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,8 @@
+# 1.2.0
+* `waitForServerLoadToFinishFunction` can now be changed after `ImprovedRemoteWebElement` was created
+* Cache reflection methods to improve performance
+* Updated dependencies
+
# 1.1.1
* Updated dependencies
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9da5906..cba4348 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -4,7 +4,7 @@ We would absolutely love to get the community involved, and we welcome any form
### Communication channels
* Communication is primarily done using issues.
-* If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
+* If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services-products/support).
* As a last resort measure or on otherwise important matter you may also [contact us directly](https://xdev.software/en/about-us/contact).
### Ways to help
@@ -12,7 +12,7 @@ We would absolutely love to get the community involved, and we welcome any form
* **Send pull requests** If you want to contribute code, check out the development instructions below.
* However when contributing larger new features, please first discuss the change you wish to make via issue with the owners of this repository before making it. Otherwise your work might be rejected and your effort was pointless.
-We also encourage you to read the [contribution instructions by GitHub](https://docs.github.com/en/get-started/quickstart/contributing-to-projects).
+We also encourage you to read the [contribution instructions by GitHub](https://docs.github.com/en/get-started/exploring-projects-on-github/contributing-to-a-project).
## Developing
@@ -20,17 +20,17 @@ We also encourage you to read the [contribution instructions by GitHub](https://
You should have the following things installed:
* Git
* Java 25 - should be as unmodified as possible (Recommended: [Eclipse Adoptium](https://adoptium.net/temurin/releases/))
-* Maven (Note that the [Maven Wrapper](https://maven.apache.org/wrapper/) is shipped with the repo)
+* Maven (Note that the [Maven Wrapper](https://maven.apache.org/tools/wrapper/) is shipped with the repo)
### Recommended setup
-* Install ``IntelliJ`` (Community Edition is sufficient)
- * Install the following plugins:
- * [Save Actions](https://plugins.jetbrains.com/plugin/22113) - Provides save actions, like running the formatter or adding ``final`` to fields
- * [SonarLint](https://plugins.jetbrains.com/plugin/7973-sonarlint) - CodeStyle/CodeAnalysis
- * You may consider disabling telemetry in the settings under ``Tools > Sonarlint -> About``
- * [Checkstyle-IDEA](https://plugins.jetbrains.com/plugin/1065-checkstyle-idea) - CodeStyle/CodeAnalysis
+* Install `IntelliJ`
+ * Recommended setup actions
+ * Disable not needed plugins
+ * Disable [telemetry](https://www.jetbrains.com/help/idea/settings-usage-statistics.html)
+ * Configure the available memory
* Import the project
- * Ensure that everything is encoded in ``UTF-8``
+ * You will get prompted to install the required plugins
+ * Ensure that everything is encoded in `UTF-8`
* Ensure that the JDK/Java-Version is correct
diff --git a/README.md b/README.md
index 0879313..7ac3b06 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@ Also contains a ton of other predefined utility, for example:
* Waiting for some time until the element is present (``waitUntil``)
Overall this should result in:
-* Less [flaky](https://www.browserstack.com/test-reporting-and-analytics/features/test-reporting/what-is-flaky-test) tests
+* Less [flaky](https://www.jetbrains.com/teamcity/ci-cd-guide/concepts/flaky-tests/) tests
* Abstraction of elements in an object oriented way
## Usage
@@ -73,7 +73,7 @@ You can also checkout the [integrated tests](./selenium-elements/src/test/java/)
[Installation guide for the latest release](https://github.com/xdev-software/selenium-elements/releases/latest#Installation)
## Support
-If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).
+If you need support as soon as possible and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services-products/support).
## Contributing
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
diff --git a/pom.xml b/pom.xml
index eff48b3..362e3df 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
software.xdevselenium-elements-root
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTpom
@@ -44,7 +44,7 @@
com.puppycrawl.toolscheckstyle
- 13.3.0
+ 13.10.0
@@ -82,12 +82,12 @@
net.sourceforge.pmdpmd-core
- 7.22.0
+ 7.26.0net.sourceforge.pmdpmd-java
- 7.22.0
+ 7.26.0
diff --git a/renovate.json5 b/renovate.json5
index 5cde43e..6bcfbcd 100644
--- a/renovate.json5
+++ b/renovate.json5
@@ -29,6 +29,16 @@
"maven"
],
"groupName": "org.seleniumhq.selenium"
+ },
+ {
+ "description": "Group org.slf4j",
+ "matchPackagePatterns": [
+ "^org.slf4j"
+ ],
+ "datasources": [
+ "maven"
+ ],
+ "groupName": "org.slf4j"
}
]
}
diff --git a/selenium-elements/pom.xml b/selenium-elements/pom.xml
index 17c5989..b1a1fb9 100644
--- a/selenium-elements/pom.xml
+++ b/selenium-elements/pom.xml
@@ -6,7 +6,7 @@
software.xdevselenium-elements
- 1.1.2-SNAPSHOT
+ 1.2.0-SNAPSHOTjarselenium-elements
@@ -53,7 +53,7 @@
org.seleniumhq.seleniumselenium-support
- 4.41.0
+ 4.47.0
@@ -70,37 +70,37 @@
org.javassistjavassist
- 3.30.2-GA
+ 3.32.0-GAorg.slf4jslf4j-api
- 2.0.17
+ 2.0.18org.junit.jupiterjunit-jupiter
- 6.0.3
+ 6.1.3testorg.slf4jslf4j-simple
- 2.0.17
+ 2.0.18testsoftware.xdevtestcontainers-selenium
- 2.0.0
+ 2.1.1testorg.seleniumhq.seleniumselenium-firefox-driver
- 4.41.0
+ 4.47.0test
@@ -113,7 +113,7 @@
org.seleniumhq.seleniumselenium-chrome-driver
- 4.41.0
+ 4.47.0test
@@ -144,7 +144,7 @@
com.mycilalicense-maven-plugin
- 5.0.0
+ 5.1.1${project.organization.url}
@@ -223,7 +223,7 @@
org.codehaus.mojoflatten-maven-plugin
- 1.7.3
+ 1.8.0ossrh
@@ -269,7 +269,7 @@
org.sonatype.centralcentral-publishing-maven-plugin
- 0.10.0
+ 0.11.0truesonatype-central-portal
@@ -291,7 +291,7 @@
com.puppycrawl.toolscheckstyle
- 13.3.0
+ 13.10.0
@@ -329,12 +329,12 @@
net.sourceforge.pmdpmd-core
- 7.22.0
+ 7.26.0net.sourceforge.pmdpmd-java
- 7.22.0
+ 7.26.0
diff --git a/selenium-elements/src/main/java/software/xdev/selenium/elements/remote/CustomizableRemoteWebElementInstaller.java b/selenium-elements/src/main/java/software/xdev/selenium/elements/remote/CustomizableRemoteWebElementInstaller.java
index b147d30..6b41328 100644
--- a/selenium-elements/src/main/java/software/xdev/selenium/elements/remote/CustomizableRemoteWebElementInstaller.java
+++ b/selenium-elements/src/main/java/software/xdev/selenium/elements/remote/CustomizableRemoteWebElementInstaller.java
@@ -30,15 +30,22 @@
@SuppressWarnings("java:S3011") // Force accessibility
public final class CustomizableRemoteWebElementInstaller
{
+ private static Method mSetElementConverter;
+
public static void install(
final RemoteWebDriver driver,
final Supplier remoteWebElementSupplier)
{
try
{
- final Method mSetElementConverter =
- RemoteWebDriver.class.getDeclaredMethod("setElementConverter", JsonToWebElementConverter.class);
- mSetElementConverter.setAccessible(true);
+ if(mSetElementConverter == null)
+ {
+ mSetElementConverter = RemoteWebDriver.class.getDeclaredMethod(
+ "setElementConverter",
+ JsonToWebElementConverter.class);
+ mSetElementConverter.setAccessible(true);
+ }
+
mSetElementConverter.invoke(
driver,
new CustomizableJsonToWebElementConverter(driver, remoteWebElementSupplier));
diff --git a/selenium-elements/src/main/java/software/xdev/selenium/elements/remote/ImprovedRemoteWebElement.java b/selenium-elements/src/main/java/software/xdev/selenium/elements/remote/ImprovedRemoteWebElement.java
index db088c3..3832fa6 100644
--- a/selenium-elements/src/main/java/software/xdev/selenium/elements/remote/ImprovedRemoteWebElement.java
+++ b/selenium-elements/src/main/java/software/xdev/selenium/elements/remote/ImprovedRemoteWebElement.java
@@ -36,12 +36,20 @@
public class ImprovedRemoteWebElement extends RemoteWebElement implements CanFindElementsSelfSearchContext
{
protected Logger logger;
- protected final String waitForServerLoadToFinishFunction;
+
+ protected String waitForServerLoadToFinishFunction;
protected boolean autoScrollIntoView = true;
public ImprovedRemoteWebElement(final String waitForServerLoadToFinishFunction)
+ {
+ this.withWaitForServerLoadToFinishFunction(waitForServerLoadToFinishFunction);
+ }
+
+ public ImprovedRemoteWebElement withWaitForServerLoadToFinishFunction(
+ final String waitForServerLoadToFinishFunction)
{
this.waitForServerLoadToFinishFunction = waitForServerLoadToFinishFunction;
+ return this;
}
public ImprovedRemoteWebElement withAutoScrollIntoView(final boolean autoScrollIntoView)
diff --git a/selenium-elements/src/test/java/software/xdev/selenium/elements/SimpleContainerTest.java b/selenium-elements/src/test/java/software/xdev/selenium/elements/SimpleContainerTest.java
index 45f2081..2623f8a 100644
--- a/selenium-elements/src/test/java/software/xdev/selenium/elements/SimpleContainerTest.java
+++ b/selenium-elements/src/test/java/software/xdev/selenium/elements/SimpleContainerTest.java
@@ -56,7 +56,9 @@ void simpleCheck(final Capabilities capabilities)
() -> new ImprovedRemoteWebElement("return document.readyState == 'complete';"));
this.remoteWebDriver.manage().window().maximize();
- this.remoteWebDriver.get(capabilities instanceof FirefoxOptions ? "about:support" : "chrome://version");
+ this.remoteWebDriver.get(capabilities instanceof FirefoxOptions
+ ? "file:///proc/cpuinfo"
+ : "chrome://version");
final BodyElement bodyElement = this.waitForFirst(BodyElement.class);
final String text = bodyElement.getText();