forked from undera/jmeter-plugins-webdriver
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addition of driver for Edge and upgrade to Seleniuṁ 4.7.2 (undera#25)
* 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. * Setting IE's Protected Mode to "off" to allow IE to start in all environments. * Removaĺ of path to Edge as from IEDriver v4.5.0, the driver will automatically locate Edge on the system. * Ui Refactor 1 * Update to Seleniuṁ 4.6.0 * UI Refactor * Adding of new wiki page for direct browseŕ testing. * Updating wiki pages for new UI. * Tests update 1. * Update of Chrome and IE tests. * Pom update. * Imporţclean-ups. * Update of Readme.md. * Fix of broken wiki links. * Fix of broken link #2. * Take #3 * Code format * Code format #2 * Syntax highlight. * Initial Browser URL now in UI and not hard coded. * Test fixes. * Upgrade to Selenium 4.7.2 and addition of driver for Edge. * Update of tests. * Removing "ignoring zoom levels" in IE as it is no longer required from Seleniuṁ 4.7.0.
- Loading branch information
Showing
22 changed files
with
770 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/main/java/com/googlecode/jmeter/plugins/webdriver/config/EdgeDriverConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package com.googlecode.jmeter.plugins.webdriver.config; | ||
|
||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.Map; | ||
import java.util.concurrent.ConcurrentHashMap; | ||
|
||
import org.openqa.selenium.edge.EdgeDriver; | ||
import org.openqa.selenium.edge.EdgeDriverService; | ||
import org.openqa.selenium.edge.EdgeOptions; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
public class EdgeDriverConfig extends WebDriverConfig<EdgeDriver> { | ||
|
||
private static final long serialVersionUID = 100L; | ||
private static final Logger LOGGER = LoggerFactory.getLogger(EdgeDriverConfig.class); | ||
|
||
private static final Map<String, EdgeDriverService> services = new ConcurrentHashMap<String, EdgeDriverService>(); | ||
Map<String, EdgeDriverService> getServices() { | ||
return services; | ||
} | ||
|
||
@Override | ||
protected EdgeDriver createBrowser() { | ||
final EdgeDriverService service = getThreadService(); | ||
EdgeOptions options = createEdgeOptions(); | ||
return service != null ? new EdgeDriver(service, options) : null; | ||
} | ||
|
||
@Override | ||
public void quitBrowser(final EdgeDriver browser) { | ||
super.quitBrowser(browser); | ||
final EdgeDriverService service = services.remove(currentThreadName()); | ||
if (service != null && service.isRunning()) { | ||
service.stop(); | ||
} | ||
} | ||
|
||
private EdgeDriverService getThreadService() { | ||
EdgeDriverService service = services.get(currentThreadName()); | ||
if (service != null) { | ||
return service; | ||
} | ||
try { | ||
service = new EdgeDriverService.Builder().usingDriverExecutable(new File(getDriverPath())).build(); | ||
service.start(); | ||
services.put(currentThreadName(), service); | ||
} catch (IOException e) { | ||
LOGGER.error("Failed to start edge service"); | ||
service = null; | ||
} | ||
return service; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
public enum RemoteCapability { | ||
CHROME, | ||
EDGE, | ||
FIREFOX, | ||
INTERNET_EXPLORER | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.