-
Notifications
You must be signed in to change notification settings - Fork 163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to connect to remote Selenium server #235
Conversation
It would really be nice to support RemoteWebDriver in the jasmine maven plugin, as this would allow using docker to start the I find it nicer than using https://github.com/Ardesco/driver-binary-downloader-maven-plugin to get the This PR is from 2014 now. Starting to be quite old. Has any progress been made to support RemoteWebDriver? I see in the sources the mention of RemoteWebDriver at jasmine-maven-plugin/src/main/java/com/github/searls/jasmine/mojo/AbstractJasmineMojo.java Line 290 in ce365e7
Thanks for a great plugin! |
Actually I see that the code is using WebDriverManager so that's a better solution and it doesn't need https://github.com/Ardesco/driver-binary-downloader-maven-plugin since it should do the binary download by itself. I guess I need to try to see if RemoteWebDriver is supported but I see no reason why it couldn't be instantiated by WebDriverManager actually. So I guess it should work. |
Actually WebDriverManager will download the driver but not the browser. So the docker solution seems to be the only solution to not have to install anything locally (except doker ofc ;)) |
Hi @vmassol @searls. Honestly I haven't really had time to work on this plugin in a long time and I haven't personally used it for any projects in about 6 - 7 years. I still do development in both javascript and java but there are just better ways to unit test javascript these days and all of it revolves around node / npm. Personally, when I have a maven based project now that also includes javascript I use the frontend-maven-plugin. That setup allows you to use node / npm for your javascript related stuff while still keeping the build as simple as running All that said, I think it's long overdo that I put a message on the README of this project stating that it is no longer being maintained and I will include my suggestions on alternative solutions. |
hey, thanks to both of you @searls & @klieber for your replies.
I'm curious about this. We have some javascript to test and I fear that testing it on the server side (with node) would not ensure it'll work fine at runtime since it executes on the client side in our case (in FF or Chrome browsers). Also we don't use any Bower, Grunt, Gulp, Jspm, Karma, or Webpack as mentioned on https://github.com/eirslett/frontend-maven-plugin, so not sure it's the right solution in our case. Now I'm not the one who wrote this javascript and javascript is not my language of expertise (I'm a java guy) so maybe I'm just plain wrong. I'm just helping on the build side of XWiki here, trying to ensure that we can test our javascript through Maven and ideally that it doesn't require installing anything on the machine where it executes (except docker). I'll check https://github.com/eirslett/frontend-maven-plugin a bit more to see if I don't miss something obvious. Feedback most welcome too ;) Thanks guys |
When I post a message regarding this plugin no longer being maintained I plan to include some examples of how to use the frontend-maven-plugin in its place. That plugin will install node / npm automatically so no requirement to have that pre-installed. |
Yes that's good but it'll still install something on the host machine! ;) |
I will take a look at merging those but can't promise anything. I am planning on getting a stable 3.0 release with |
closes searls#234 closes searls#235
Example usage: ```xml <plugin> <groupId>com.github.searls</groupId> <artifactId>jasmine-maven-plugin</artifactId> <version>${jasmine-maven-plugin.version}</version> <executions> <execution> <goals> <goal>test</goal> </goals> </execution> </executions> <configuration> <serverHostname>${accessibleHostname}</serverHostname> <webDriverClassName>org.openqa.selenium.remote.RemoteWebDriver</webDriverClassName> <webDriverCapabilities> <webDriverCapability> <name>browserName</name> <value>chrome</value> </webDriverCapability> <webDriverCapability> <name>goog:chromeOptions</name> <value implementation="org.openqa.selenium.chrome.ChromeOptions"> <headless>true</headless> </value> </webDriverCapability> </webDriverCapabilities> </configuration> </plugin> ``` closes searls#234 closes searls#235 closes searls#349
Example usage: ```xml <plugin> <groupId>com.github.searls</groupId> <artifactId>jasmine-maven-plugin</artifactId> <version>${jasmine-maven-plugin.version}</version> <executions> <execution> <goals> <goal>test</goal> </goals> </execution> </executions> <configuration> <serverHostname>${accessibleHostname}</serverHostname> <webDriverClassName>org.openqa.selenium.remote.RemoteWebDriver</webDriverClassName> <webDriverCapabilities> <webDriverCapability> <name>browserName</name> <value>chrome</value> </webDriverCapability> <webDriverCapability> <name>goog:chromeOptions</name> <value implementation="org.openqa.selenium.chrome.ChromeOptions"> <headless>true</headless> </value> </webDriverCapability> </webDriverCapabilities> <!-- If your remote server is not running at http://localhost:4444/wd/hub then you can use this parameter to configure the right location --> <!-- <remoteWebDriverUrl>http://localhost:4444/wd/hub</remoteWebDriverUrl> --> </configuration> </plugin> ``` closes searls#234 closes searls#235 closes searls#349
Example usage: ```xml <plugin> <groupId>com.github.searls</groupId> <artifactId>jasmine-maven-plugin</artifactId> <version>${jasmine-maven-plugin.version}</version> <executions> <execution> <goals> <goal>test</goal> </goals> </execution> </executions> <configuration> <serverHostname>${accessibleHostname}</serverHostname> <webDriverClassName>org.openqa.selenium.remote.RemoteWebDriver</webDriverClassName> <webDriverCapabilities> <webDriverCapability> <name>browserName</name> <value>chrome</value> </webDriverCapability> <webDriverCapability> <name>goog:chromeOptions</name> <value implementation="org.openqa.selenium.chrome.ChromeOptions"> <headless>true</headless> </value> </webDriverCapability> </webDriverCapabilities> <!-- If your remote server is not running at http://localhost:4444/wd/hub then you can use this parameter to configure the right location --> <!-- <remoteWebDriverUrl>http://localhost:4444/wd/hub</remoteWebDriverUrl> --> </configuration> </plugin> ``` closes searls#234 closes searls#235 closes searls#349
Fixes issue #234.
The user still has to specify
<serverHostname>
for this to work, e.g.: