Skip to content

Commit

Permalink
Fix UI Proxy issue in Firefox Config and Upgrade to Selenium 4.8.1 (u…
Browse files Browse the repository at this point in the history
…ndera#27)

* 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.

* Upgrade to Selenium 4.8.0

* Proxy UI fix in Firefox && upgrade to Selenium 4.8.1.
  • Loading branch information
rbourga authored Mar 15, 2023
1 parent f221739 commit 31740c7
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 56 deletions.
6 changes: 3 additions & 3 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>4.8.0</version>
<version>4.8.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>4.8.0</selenium.version>
<selenium.version>4.8.1</selenium.version>
</properties>

<build>
Expand Down Expand Up @@ -136,7 +136,7 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>htmlunit-driver</artifactId>
<version>4.7.0</version>
<version>4.8.0</version>
</dependency>

<!-- begin need this libraries for HtmlUnitDriver -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
package com.googlecode.jmeter.plugins.webdriver.config.gui;

import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;

import org.apache.jmeter.testelement.TestElement;
import com.googlecode.jmeter.plugins.webdriver.config.FirefoxDriverConfig;
import com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig;

import kg.apc.jmeter.JMeterPluginsUtils;

public class FirefoxDriverConfigGui extends WebDriverConfigGui implements ItemListener {
public class FirefoxDriverConfigGui extends WebDriverConfigGui {

private static final long serialVersionUID = 100L;

Expand Down Expand Up @@ -65,10 +62,4 @@ public void clearGui() {
public void configure(TestElement element) {
super.configure(element);
}

public void itemStateChanged(ItemEvent itemEvent) {
if (itemEvent.getSource() == userAgentOverrideCheckbox) {
userAgentOverrideText.setEnabled(userAgentOverrideCheckbox.isSelected());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@

import kg.apc.jmeter.JMeterPluginsUtils;

import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.ItemListener;

import org.apache.jmeter.testelement.TestElement;

import com.googlecode.jmeter.plugins.webdriver.config.InternetExplorerDriverConfig;
import com.googlecode.jmeter.plugins.webdriver.config.WebDriverConfig;

public class InternetExplorerDriverConfigGui extends WebDriverConfigGui implements ItemListener, FocusListener {
public class InternetExplorerDriverConfigGui extends WebDriverConfigGui {

private static final long serialVersionUID = 100L;

Expand Down Expand Up @@ -67,18 +63,4 @@ public void clearGui() {
public void configure(TestElement element) {
super.configure(element);
}

@Override
public void focusGained(FocusEvent e) {
// Nothing to do
}

@Override
public void focusLost(FocusEvent e) {
if (initialBrowserUrl.equals(e.getComponent()) && !isValidUrl(initialBrowserUrl.getText())) {
IEerrorMsg.setText("The URL is malformed");
} else {
IEerrorMsg.setText("");
}
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.googlecode.jmeter.plugins.webdriver.config.gui;

import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.ItemListener;
import org.apache.commons.lang.StringUtils;
import org.apache.jmeter.testelement.TestElement;

Expand All @@ -12,7 +9,7 @@

import kg.apc.jmeter.JMeterPluginsUtils;

public class RemoteDriverConfigGui extends WebDriverConfigGui implements ItemListener, FocusListener {
public class RemoteDriverConfigGui extends WebDriverConfigGui {

private static final long serialVersionUID = 100L;

Expand Down Expand Up @@ -83,23 +80,4 @@ public void configure(TestElement element) {
localFileDetector.setSelected(config.isLocalFileDectedor());
}
}

@Override
public void focusGained(FocusEvent e) {
// Nothing to do
}

@Override
public void focusLost(FocusEvent e) {
if (remoteSeleniumGridText.equals(e.getComponent()) && !isValidUrl(remoteSeleniumGridText.getText())) {
RemoteErrorMsg.setText("The selenium grid URL is malformed");
} else {
RemoteErrorMsg.setText("");
}
if (initialBrowserUrl.equals(e.getComponent()) && !isValidUrl(initialBrowserUrl.getText())) {
IEerrorMsg.setText("The URL is malformed");
} else {
IEerrorMsg.setText("");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
Expand Down Expand Up @@ -36,7 +37,7 @@
import kg.apc.jmeter.JMeterPluginsUtils;
import kg.apc.jmeter.gui.Grid;

public abstract class WebDriverConfigGui extends AbstractConfigGui implements ItemListener {
public abstract class WebDriverConfigGui extends AbstractConfigGui implements FocusListener, ItemListener {

private static final long serialVersionUID = 100L;

Expand Down Expand Up @@ -448,6 +449,29 @@ private void createPacUrlProxy(JPanel panel, ButtonGroup group) {
panel.add(pacUrlPanel);
}

@Override
public void focusGained(FocusEvent e) {
// Nothing to do
}

@Override
public void focusLost(FocusEvent e) {
if (e.getComponent().equals(remoteSeleniumGridText)) {
if (!isValidUrl(remoteSeleniumGridText.getText())) {
RemoteErrorMsg.setText("The selenium grid URL is malformed");
} else {
RemoteErrorMsg.setText("");
}
}
if (e.getComponent().equals(initialBrowserUrl)) {
if (!isValidUrl(initialBrowserUrl.getText())) {
IEerrorMsg.setText("The URL is malformed");
} else {
IEerrorMsg.setText("");
}
}
}

@Override
public void itemStateChanged(ItemEvent itemEvent) {
if (itemEvent.getSource() == pacUrlProxy) {
Expand All @@ -460,6 +484,8 @@ public void itemStateChanged(ItemEvent itemEvent) {
enableOtherProtocolsOnlyIfManualProxySelectedAndUseHttpSettingsIsNotSelected();
} else if (itemEvent.getSource() == useHttpSettingsForAllProtocols) {
enableOtherProtocolsOnlyIfManualProxySelectedAndUseHttpSettingsIsNotSelected();
} else if (itemEvent.getSource() == userAgentOverrideCheckbox) {
userAgentOverrideText.setEnabled(userAgentOverrideCheckbox.isSelected());
}
}

Expand Down

0 comments on commit 31740c7

Please sign in to comment.