Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Commit 5f0025d

Browse files
committed
Removed PhantomJS and HTMLUnit
1 parent 471a26f commit 5f0025d

File tree

5 files changed

+51
-153
lines changed

5 files changed

+51
-153
lines changed

.travis.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ env:
88
- PROFILE=build,firefox
99
- PROFILE=build,googlechromeheadless
1010
- PROFILE=build,firefoxheadless
11-
- PROFILE=build,phantomjs
12-
- PROFILE=build,htmlunitwithjs
1311

1412
stages:
1513
- test

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ your pom.xml:
4545
<dependency>
4646
<groupId>com.github.hi-fi</groupId>
4747
<artifactId>robotframework-seleniumlibrary</artifactId>
48-
<version>3.14.0.0</version>
48+
<version>3.141.59.0</version>
4949
<scope>test</scope>
5050
</dependency>
5151

5252
If you cannot use the robotframework-maven-plugin you can use the
53-
[jar-with-dependencies](http://central.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/3.14.0.0/robotframework-seleniumlibrary-3.14.0.0-jar-with-dependencies.jar),
53+
[jar-with-dependencies](http://central.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/3.141.59.0/robotframework-seleniumlibrary-3.141.59.0-jar-with-dependencies.jar),
5454
which contains all required libraries.
5555

5656
* More information about this library can be found in the
57-
[Keyword Documentation](http://central.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/3.14.0.0/robotframework-seleniumlibrary-3.14.0.0.html).
57+
[Keyword Documentation](http://central.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/3.141.59.0/robotframework-seleniumlibrary-3.141.59.0.html).
5858
* For keyword completion in RIDE you can download this
59-
[Library Specs](http://central.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/3.14.0.0/robotframework-seleniumlibrary-3.14.0.0.xml)
59+
[Library Specs](http://central.maven.org/maven2/com/github/hi-fi/robotframework-seleniumlibrary/3.141.59.0/robotframework-seleniumlibrary-3.141.59.0.xml)
6060
and place it in your PYTHONPATH.
6161

6262
Differences

pom.xml

Lines changed: 47 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
23
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
34
<modelVersion>4.0.0</modelVersion>
45

56
<groupId>com.github.hi-fi</groupId>
67
<artifactId>robotframework-seleniumlibrary</artifactId>
7-
<version>3.14.0.1-SNAPSHOT</version>
8+
<version>3.141.59.0-SNAPSHOT</version>
89
<packaging>jar</packaging>
910

1011
<name>Robot Framework :: SeleniumLibrary</name>
@@ -67,10 +68,9 @@
6768
<downloadSources>true</downloadSources>
6869
<downloadJavadocs>true</downloadJavadocs>
6970
<aspectj.version>1.9.1</aspectj.version>
70-
<java.version>1.7</java.version>
71-
<robotframework.version>3.0.4</robotframework.version>
72-
<robotframework.maven.plugin.version>1.4.7</robotframework.maven.plugin.version>
73-
<selenium.version>3.14.0</selenium.version>
71+
<java.version>1.8</java.version>
72+
<robotframework.maven.plugin.version>1.5.1</robotframework.maven.plugin.version>
73+
<selenium.version>3.141.59</selenium.version>
7474
<keywords.class>SeleniumLibrary</keywords.class>
7575
<browser>jbrowser</browser>
7676
</properties>
@@ -81,16 +81,16 @@
8181
<artifactId>javalib-core</artifactId>
8282
<version>1.2.1</version>
8383
</dependency>
84+
<dependency>
85+
<groupId>org.robotframework</groupId>
86+
<artifactId>robotframework</artifactId>
87+
<version>3.1.1</version>
88+
</dependency>
8489
<dependency>
8590
<groupId>org.seleniumhq.selenium</groupId>
8691
<artifactId>selenium-server</artifactId>
8792
<version>${selenium.version}</version>
8893
</dependency>
89-
<dependency>
90-
<groupId>org.robotframework</groupId>
91-
<artifactId>robotframework</artifactId>
92-
<version>${robotframework.version}</version>
93-
</dependency>
9494
<dependency>
9595
<groupId>org.aspectj</groupId>
9696
<artifactId>aspectjrt</artifactId>
@@ -115,46 +115,17 @@
115115
<dependency>
116116
<groupId>io.appium</groupId>
117117
<artifactId>java-client</artifactId>
118-
<version>5.0.4</version>
119-
<exclusions>
120-
<exclusion>
121-
<groupId>org.seleniumhq.selenium</groupId>
122-
<artifactId>selenium-java</artifactId>
123-
</exclusion>
124-
<exclusion>
125-
<groupId>org.seleniumhq.selenium</groupId>
126-
<artifactId>selenium-support</artifactId>
127-
</exclusion>
128-
<exclusion>
129-
<groupId>org.seleniumhq.selenium</groupId>
130-
<artifactId>selenium-api</artifactId>
131-
</exclusion>
132-
</exclusions>
118+
<version>7.0.0</version>
133119
</dependency>
134120
<dependency>
135121
<groupId>org.apache.commons</groupId>
136122
<artifactId>commons-exec</artifactId>
137123
<version>1.3</version>
138124
</dependency>
139-
<dependency>
140-
<groupId>com.codeborne</groupId>
141-
<artifactId>phantomjsdriver</artifactId>
142-
<version>1.4.4</version>
143-
<exclusions>
144-
<exclusion>
145-
<groupId>org.seleniumhq.selenium</groupId>
146-
<artifactId>selenium-api</artifactId>
147-
</exclusion>
148-
<exclusion>
149-
<groupId>org.seleniumhq.selenium</groupId>
150-
<artifactId>selenium-remote-driver</artifactId>
151-
</exclusion>
152-
</exclusions>
153-
</dependency>
154125
<dependency>
155126
<groupId>com.machinepublishers</groupId>
156127
<artifactId>jbrowserdriver</artifactId>
157-
<version>1.0.0</version>
128+
<version>1.0.1</version>
158129
</dependency>
159130
<dependency>
160131
<groupId>org.mockito</groupId>
@@ -412,45 +383,20 @@
412383
<groupId>org.robotframework</groupId>
413384
<artifactId>robotframework-maven-plugin</artifactId>
414385
<configuration>
415-
<externalRunner>
416-
<jvmArgs>
417-
<jvmArg>-Dwebdriver.gecko.driver=${webdriver.gecko.driver}</jvmArg>
418-
</jvmArgs>
419-
</externalRunner>
386+
<externalRunner>
387+
<jvmArgs>
388+
<jvmArg>-Dwebdriver.gecko.driver=${webdriver.gecko.driver}</jvmArg>
389+
</jvmArgs>
390+
</externalRunner>
420391
</configuration>
421392
</plugin>
422393
</plugins>
423394
</build>
424395
</profile>
425-
<profile>
426-
<id>firefoxheadless</id>
427-
<properties>
428-
<browser>firefoxheadless</browser>
429-
</properties>
430-
<build>
431-
<plugins>
432-
<plugin>
433-
<groupId>com.lazerycode.selenium</groupId>
434-
<artifactId>driver-binary-downloader-maven-plugin</artifactId>
435-
</plugin>
436-
<plugin>
437-
<groupId>org.robotframework</groupId>
438-
<artifactId>robotframework-maven-plugin</artifactId>
439-
<configuration>
440-
<externalRunner>
441-
<jvmArgs>
442-
<jvmArg>-Dwebdriver.gecko.driver=${webdriver.gecko.driver}</jvmArg>
443-
</jvmArgs>
444-
</externalRunner>
445-
</configuration>
446-
</plugin>
447-
</plugins>
448-
</build>
449-
</profile>
450396
<profile>
451-
<id>phantomjs</id>
397+
<id>firefoxheadless</id>
452398
<properties>
453-
<browser>phantomjs</browser>
399+
<browser>firefoxheadless</browser>
454400
</properties>
455401
<build>
456402
<plugins>
@@ -461,13 +407,13 @@
461407
<plugin>
462408
<groupId>org.robotframework</groupId>
463409
<artifactId>robotframework-maven-plugin</artifactId>
464-
<configuration>
465-
<externalRunner>
466-
<jvmArgs>
467-
<jvmArg>-Dphantomjs.binary.path=${phantomjs.binary.path}</jvmArg>
468-
</jvmArgs>
469-
</externalRunner>
470-
</configuration>
410+
<configuration>
411+
<externalRunner>
412+
<jvmArgs>
413+
<jvmArg>-Dwebdriver.gecko.driver=${webdriver.gecko.driver}</jvmArg>
414+
</jvmArgs>
415+
</externalRunner>
416+
</configuration>
471417
</plugin>
472418
</plugins>
473419
</build>
@@ -486,52 +432,38 @@
486432
<plugin>
487433
<groupId>org.robotframework</groupId>
488434
<artifactId>robotframework-maven-plugin</artifactId>
489-
<configuration>
490-
<externalRunner>
491-
<jvmArgs>
492-
<jvmArg>-Dwebdriver.chrome.driver=${webdriver.chrome.driver}</jvmArg>
493-
</jvmArgs>
494-
</externalRunner>
495-
</configuration>
435+
<configuration>
436+
<externalRunner>
437+
<jvmArgs>
438+
<jvmArg>-Dwebdriver.chrome.driver=${webdriver.chrome.driver}</jvmArg>
439+
</jvmArgs>
440+
</externalRunner>
441+
</configuration>
496442
</plugin>
497443
</plugins>
498444
</build>
499445
</profile>
500446
<profile>
501-
<id>googlechromeheadless</id>
502-
<properties>
503-
<browser>googlechromeheadless</browser>
504-
</properties>
505-
<build>
506-
<plugins>
507-
<plugin>
508-
<groupId>com.lazerycode.selenium</groupId>
509-
<artifactId>driver-binary-downloader-maven-plugin</artifactId>
510-
</plugin>
511-
<plugin>
512-
<groupId>org.robotframework</groupId>
513-
<artifactId>robotframework-maven-plugin</artifactId>
514-
<configuration>
515-
<externalRunner>
516-
<jvmArgs>
517-
<jvmArg>-Dwebdriver.chrome.driver=${webdriver.chrome.driver}</jvmArg>
518-
</jvmArgs>
519-
</externalRunner>
520-
</configuration>
521-
</plugin>
522-
</plugins>
523-
</build>
524-
</profile>
525-
<profile>
526-
<id>htmlunitwithjs</id>
447+
<id>googlechromeheadless</id>
527448
<properties>
528-
<browser>htmlunitwithjs</browser>
449+
<browser>googlechromeheadless</browser>
529450
</properties>
530451
<build>
531452
<plugins>
453+
<plugin>
454+
<groupId>com.lazerycode.selenium</groupId>
455+
<artifactId>driver-binary-downloader-maven-plugin</artifactId>
456+
</plugin>
532457
<plugin>
533458
<groupId>org.robotframework</groupId>
534459
<artifactId>robotframework-maven-plugin</artifactId>
460+
<configuration>
461+
<externalRunner>
462+
<jvmArgs>
463+
<jvmArg>-Dwebdriver.chrome.driver=${webdriver.chrome.driver}</jvmArg>
464+
</jvmArgs>
465+
</externalRunner>
466+
</configuration>
535467
</plugin>
536468
</plugins>
537469
</build>

src/main/java/com/github/markusbernhardt/seleniumlibrary/keywords/BrowserManagement.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,10 @@
3939
import org.openqa.selenium.firefox.FirefoxDriver;
4040
import org.openqa.selenium.firefox.FirefoxOptions;
4141
import org.openqa.selenium.firefox.FirefoxProfile;
42-
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
4342
import org.openqa.selenium.ie.InternetExplorerDriver;
4443
import org.openqa.selenium.ie.InternetExplorerOptions;
4544
import org.openqa.selenium.opera.OperaDriver;
4645
import org.openqa.selenium.opera.OperaOptions;
47-
import org.openqa.selenium.phantomjs.PhantomJSDriver;
4846
import org.openqa.selenium.remote.Augmenter;
4947
import org.openqa.selenium.remote.DesiredCapabilities;
5048
import org.openqa.selenium.remote.HttpCommandExecutor;
@@ -171,9 +169,6 @@ public void closeBrowser() {
171169
"| Opera | opera |\r\n" +
172170
"| Android | android |\r\n" +
173171
"| Iphone | iphone |\r\n" +
174-
"| PhantomJS | phantomjs |\r\n" +
175-
"| HTMLUnit | htmlunit |\r\n" +
176-
"| HTMLUnit with Javascript | htmlunitwithjs |\r\n" +
177172
"| JBrowser | jbrowser |\r\n" +
178173
"\r\n" +
179174
"To be able to actually use one of these browsers, you need to have a matching Selenium browser driver available. See the [https://github.com/Hi-Fi/robotframework-seleniumlibrary-java#browser-drivers|project documentation] for more details.\r\n" +
@@ -659,19 +654,8 @@ protected WebDriver createLocalWebDriver(String browserName, Capabilities desire
659654
return new ChromeDriver((ChromeOptions)desiredCapabilities);
660655
case "opera":
661656
return new OperaDriver(new OperaOptions().merge(desiredCapabilities));
662-
case "phantomjs":
663-
logging.warn("Phantomjs going to be removed as it's development is suspended. Should move to some other browser" );
664-
return new PhantomJSDriver(desiredCapabilities);
665657
case "safari":
666658
return new SafariDriver(new SafariOptions().merge(desiredCapabilities));
667-
case "htmlunit":
668-
logging.warn("HTMLUnit-driver going to be removed from Selenium. Should move to some other browser" );
669-
return new HtmlUnitDriver(desiredCapabilities);
670-
case "htmlunitwithjs":
671-
logging.warn("HTMLUnit-driver going to be removed from Selenium. Should move to some other browser" );
672-
HtmlUnitDriver driver = new HtmlUnitDriver(desiredCapabilities);
673-
driver.setJavascriptEnabled(true);
674-
return driver;
675659
case "jbrowser":
676660
return new JBrowserDriver(Settings.builder().build());
677661
case "android":
@@ -738,19 +722,9 @@ protected Capabilities createCapabilities(String browserName, String desiredCapa
738722
case "opera":
739723
desiredCapabilities = new OperaOptions();
740724
break;
741-
case "phantomjs":
742-
logging.warn("Phantomjs going to be removed as it's development is suspended. Should move to some other browser" );
743-
desiredCapabilities = DesiredCapabilities.phantomjs();
744-
break;
745725
case "safari":
746726
desiredCapabilities = new SafariOptions();
747727
break;
748-
case "htmlunit":
749-
case "htmlunitwithjs":
750-
logging.warn("HTMLUnit-driver going to be removed from Selenium. Should move to some other browser" );
751-
desiredCapabilities = DesiredCapabilities.htmlUnit();
752-
((DesiredCapabilities) desiredCapabilities).setBrowserName("htmlunit");
753-
break;
754728
case "jbrowser":
755729
desiredCapabilities = new DesiredCapabilities("jbrowser", "1", Platform.ANY);
756730
break;

src/test/java/com/github/markusbernhardt/seleniumlibrary/keywords/BrowserManagementTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ public void testCreateDesiredCapabilitiesWithOnlyBrowserOptions() {
6262
assertTrue(profile.getStringPreference("network.proxy.http", "wrong") != "wrong");
6363
}
6464

65-
@Test
66-
public void testCreateDesiredCapabilitiesForHtmlUnit() {
67-
Capabilities dc = bm.createCapabilities("htmlunitwithjs", null, "");
68-
assertTrue(dc.getBrowserName().equals("htmlunit"));
69-
}
70-
7165
@Test
7266
public void parseChromeBrowserOptions() {
7367
ChromeOptions chromeOptions = new ChromeOptions();

0 commit comments

Comments
 (0)