Skip to content

Commit

Permalink
Project update to Selenium 4.5 and JDK 17 (undera#21)
Browse files Browse the repository at this point in the history
* Upgrade of dependencies.
Removal of deprecated Phantomjs.
Removal of deprecated code.
Addition of "SuppressWarnings" tags where needed. To de resolved at a later stage.

* Adding IE capabilities for RemoteWebDriver.

* Upgrade of function call.

* Addition of field in the UI to set the path to the Firefox Gecko driver.

* Wiki update.

* Addition of input field for msegde.exe

* Clean-ups and finalisations.

* Addition of IE11 in MsEdge for Remote execution.

* Integrating changes from Shinu on Aug 26, 2019.

* Merging of thefuckingcode changes from Apr 17, 2021.

* Setting of default value of path to msedge.exe

* Update of Chrome tests to JDK 17.

* Update of Firefox tests to JDK 17.

* Upgrade of HTMLUntit tests to JDK 17.

* Update of InternetExplorer tests to JDK 17.

* Update of RemoteDriver tests to JDK 17.

* Update of WebDriver tests to JDK 17.

* Formatting fixes.

* Formatting fixes 2.

* Formatting fixes #3.

* Addition of Geckodriver v0.31 for Firefox tests.

* Usage of GeckoDriver default service for unit tests instead of real Geckodriver.exe.

* Update to Selenium 4.5

* Ui fix.

* Addition of geckodriver to travis CI for the firefox tests

* Matching Continous Integration test conditions.
  • Loading branch information
rbourga authored Oct 28, 2022
1 parent ee3dcf8 commit c2a7f93
Show file tree
Hide file tree
Showing 42 changed files with 575 additions and 740 deletions.
7 changes: 7 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
sudo: false # to use new infrastructure
language: java
addons:
firefox: "106.0.2"
before_install:
- wget https://github.com/mozilla/geckodriver/releases/download/v0.32.0/geckodriver-v0.32.0-linux64.tar.gz
- mkdir geckodriver
- tar -xzf geckodriver-v0.32.0-linux64.tar.gz -C geckodriver
- export PATH=$PATH:$PWD/geckodriver
install: "mvn -Dmaven.test.skip=true clean install --batch-mode"
script: "mvn -Djava.awt.headless=true -Dmaven.test.redirectTestOutputToFile=true --fail-at-end --batch-mode org.jacoco:jacoco-maven-plugin:prepare-agent test org.jacoco:jacoco-maven-plugin:report"
after_success:
Expand Down
11 changes: 7 additions & 4 deletions FirefoxDriverConfig.wiki
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@
== Introduction ==
Add this configuration to enable browser based performance testing using Firefox. This document covers the various configuration options available on the Firefox browser. For an overview of performing client sider performance testing, refer to the [WebDriverTutorial Web Driver Tutorial].

Different browsers have different levels of setup complexity. In the overall scheme of things, using a Firefox Browser is considered to have an *easy level* of setup complexity. However, it is important to realise that due to the rapid releases of Firefox, the latest Firefox version may not work with the latest WebDriver set. The table below describes the version of Firefox that is compatible with JMeterPlugins:
Different browsers have different levels of setup complexity. In the overall scheme of things, using a Firefox Browser is considered to have an *easy level* of setup complexity. However, it is important to realise that due to the rapid releases of Firefox, the latest Firefox version may not work with the latest WebDriver set.

|| JMeterPlugins version || Firefox compatible version ||
|| 1.1.2 || 22 ||
|| 1.1.3 || 26 ||
As per Selenium 4, it requires Firefox 78 or greater. It is also recommended to always use the latest version of geckodriver.

*Specific versions of Firefox is available for download at the [https://ftp.mozilla.org/pub/mozilla.org/firefox/releases/ Firefox Website]*.
Expand Down Expand Up @@ -57,6 +55,11 @@ This is a comma separated list of all host(s) and/or IP Address(es) that will by
For networks that have a proxy configuration server (PAC), and its name and the location of the PAC file is known, please use this option. The usual configuration for this is {{{http://proxy-server/proxy.pac}}}

== Firefox ==
For Web Driver controls to work against Firefox, it is important to:
# [https://github.com/mozilla/geckodriver/releases Download the geckodriver driver] for your Operating System.
# Unzip the binary to a specific location
# Specify the path to the geckodriver.exe in the "Path to Firefox Driver" field in this tab.

The Firefox browser allows its user agent to be overridden. To do so, check the 'Override User Agent' checkbox and then paste in the user agent string to use. The UserAgentString.com site has an [http://www.useragentstring.com/pages/useragentstring.php extensive list of user agent strings].

There is also an option to enable NTLM
Expand Down
10 changes: 6 additions & 4 deletions InternetExplorerConfig.wiki
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= InternetExplorer Driver Config =

== Introduction ==
Add this configuration to enable browser based performance testing using InternetExplorer. This document covers the various configuration options available on the InternetExplorer browser. For an overview of performing client sider performance testing, refer to the [WebDriverTutorial Web Driver Tutorial].
Add this configuration to enable browser based performance testing using InternetExplorer 11 (IE) mode in Microsoft Edge. This document covers the various configuration options available on the InternetExplorer browser. For an overview of performing client sider performance testing, refer to the [WebDriverTutorial Web Driver Tutorial].

Different browsers have different levels of setup complexity. In the overall scheme of things, using a InternetExplorer Browser is considered to have a *medium level* of setup complexity.

Expand All @@ -16,6 +16,7 @@ The main part of the InternetExplorer configuration UI lies in the tabs:
# InternetExplorer
# Experimental

Upon start-up, IE will load "http://wwww.bing.com". So ensure the browser can access this url otherwise the driver will fail.

== Proxy ==
The default configuration (Use system proxy) is suitable for most. However, if you operate within a corporate network (that use http proxies), then this section may be important to you.
Expand Down Expand Up @@ -54,10 +55,11 @@ This is a comma separated list of all host(s) and/or IP Address(es) that will by
For networks that have a proxy configuration server (PAC), and its name and the location of the PAC file is known, please use this option. The usual configuration for this is http://proxy-server/proxy.pac

== InternetExplorer ==
For Web Driver controls to work against InternetExplorer, it is important to:
# [http://selenium-release.storage.googleapis.com/index.html Download the InternetExplorer driver] for your Operating System.
For Web Driver controls to work against InternetExplorer in Edge, it is important to:
# [https://www.selenium.dev/downloads/ Download the InternetExplorer driver] for your Operating System. Make sure that the version of IEDriver that you download is 4.0.0.0 or greater.
# Unzip the binary to a specific location
# Specify the InternetExplorer binary in the input field in this tab.
# Specify the InternetExplorerDriver binary in the input field in this tab.
# In the second field, if the default path to the Microsoft Edge binary is not good, change it accordingly.

[/img/wiki/web-driver/internetexplorer-driver-tab.png]

Expand Down
19 changes: 0 additions & 19 deletions PhantomJSDriverConfig.wiki

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ Selenium/WebDriver testing ability. It's good to start with [2-minute tutorial](
* [Firefox Config](FirefoxDriverConfig.wiki)
* [HTMLUnit Config](HtmlUnitDriverConfig.wiki)
* [Remote WebDriver Config](RemoteDriverConfig.wiki)
* [PhantomJS Config](PhantomJSDriverConfig.wiki)
* [Internet Explorer Config](InternetExplorerConfig.wiki)
3 changes: 3 additions & 0 deletions RemoteDriverConfig.wiki
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Specify the URL of the Selenium Grid. The URL must be correct, if you specify a
=== Capability ===
Specify which browser selects from your Selenium Grid. Currently it only selects the browser matching the browserName. So if you are running three concurrent users it will spin three browser instances in a selenium grid node.

For Internet Explorer, the system will ask your Selenium Grid to launch Microsoft Edge in InternetExplorer 11 (IE) mode. If the default path to msedge.exe on the remote server is not good, then change it appropriately.
Upon start-up, IE will load "http://wwww.bing.com". So ensure the remote server can access this url otherwise the driver will fail.

=== Headless ===
Specify if the browser is to be run in headless mode.

Expand Down
Binary file modified img/internetexplorer-driver-tab.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed img/phantomjs-config.png
Binary file not shown.
58 changes: 26 additions & 32 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>kg.apc</groupId>
<artifactId>jmeter-plugins-webdriver</artifactId>
<version>3.4</version>
<version>4.5.1</version>
<packaging>jar</packaging>

<name>WebDriver/Selenium</name>
Expand Down Expand Up @@ -34,7 +34,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<selenium.version>3.141.59</selenium.version>
<selenium.version>4.5.0</selenium.version>
</properties>

<build>
Expand All @@ -50,14 +50,29 @@
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<configuration>
<argLine>
--add-opens java.base/java.io=ALL-UNNAMED
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/java.lang.reflect=ALL-UNNAMED
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.util.concurrent=ALL-UNNAMED
--add-opens=java.base/sun.security.jca=ALL-UNNAMED
</argLine>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.apache.jmeter</groupId>
<artifactId>ApacheJMeter_core</artifactId>
<version>2.13</version>
<version>5.5</version>
<exclusions>
<exclusion>
<groupId>commons-math3</groupId>
Expand All @@ -73,12 +88,12 @@
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>jmeter-plugins-cmn-jmeter</artifactId>
<version>0.3</version>
<version>0.7</version>
</dependency>
<dependency>
<groupId>kg.apc</groupId>
<artifactId>jmeter-plugins-emulators</artifactId>
<version>0.2</version>
<version>0.4</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -120,19 +135,19 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>htmlunit-driver</artifactId>
<version>2.33.0</version>
<version>3.64.0</version>
</dependency>

<!-- begin need this libraries for HtmlUnitDriver -->
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4.1</version>
<version>4.4.15</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
Expand All @@ -142,7 +157,7 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5</version>
<version>4.5.13</version>
</dependency>
<!--
<dependency>
Expand All @@ -153,21 +168,6 @@
-->
<!-- end need this libraries for HtmlUnitDriver -->
<!-- start needed libraries for GhostDriver -->
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.4.4</version>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- end needed libraries for GhostDriver -->
<dependency>
<groupId>de.sciss</groupId>
Expand All @@ -183,19 +183,13 @@
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>2.0.2</version>
<version>2.0.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<version>2.0.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>3.0.0</version>
<version>2.0.9</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down

This file was deleted.

Loading

0 comments on commit c2a7f93

Please sign in to comment.