Comments (11)
Yes, probably. I think it would be useful to add some warning for windows users, imho.
Anyway, thanks for your help.
from htmlunit-driver.
http://stackoverflow.com/a/18413058/725944
java ignores the -cp when you specify -jar, you need to launch it the way the example shows in the README
from htmlunit-driver.
But I want to run in standalone mode, not in Grid. Or the command would be the same?
from htmlunit-driver.
then point your "-jar" to the htmlunit-driver-standalone jar file instead?
from htmlunit-driver.
and yes, using the -cp way would be the same for non-grid
from htmlunit-driver.
then point your "-jar" to the htmlunit-driver-standalone jar file instead?
I get the following error
# java -jar htmlunit-driver-standalone-2.20.jar
no main manifest attribute, in htmlunit-driver-standalone-2.20.jar
I just want to run selenium server in standalone mode with htmlunit driver support. I'm using codeception framework with the following settings
modules:
enabled:
- \Helper\Acceptance
- WebDriver:
browser: htmlunit
url: http://127.0.0.1/
port: 4444
and yes, using the -cp way would be the same for non-grid
and what class should I use instead of org.openqa.grid.selenium.GridLauncher for standalone mode? As I understand I have to specify fully qualified name of the class from the JAR that has the main(String[]) method
from htmlunit-driver.
you use GridLauncher for standalone mode, it's what the selenium-server uses, only if you use the command line argument "-role" will it launch in hub or node mode.
from htmlunit-driver.
I got it. So these commands would have the same "effect"?
# java -jar selenium-2.53.0.jar -Dwebdriver.chrome.driver=chromedriver -host 192.168.127.1 -port 4444
# java -cp "selenium-2.53.0.jar" org.openqa.grid.selenium.GridLauncher -host 192.168.127.1 -port 4444 -Dwebdriver.chrome.driver=chromedriver
from htmlunit-driver.
essentially yes... but keep in mind the "-D" parameters should be BEFORE any -jar or classname listed. otherwise they are treated as command line arguments, rather than setting a system property. It works both ways currently in 2.X of selenium... but in 3.X it will not work, and you must specify it early in the command line.
from htmlunit-driver.
Thanks. Will bear in mind
BTW
could add some notice to the example? Because it doesn't work on windows
> java.exe -cp "htmlunit.jar:selenium.jar" org.openqa.grid.selenium.GridLauncher -host 127.0.0.1 -port
4444 -Dwebdriver.chrome.driver=chromedriver.exe
Error: Could not find or load main class org.openqa.grid.selenium.GridLauncher
You must use semicolon as separator
> java.exe -cp "htmlunit.jar;selenium.jar" org.openqa.grid.selenium.GridLauncher -host 127.0.0.1 -port
4444 -Dwebdriver.chrome.driver=chromedriver.exe
22:12:01.471 INFO - Launching a standalone Selenium Server
Setting system property webdriver.chrome.driver to chromedriver.exe
22:12:01.668 INFO - Java: Oracle Corporation 25.91-b14
22:12:01.668 INFO - OS: Windows 7 6.1 x86
22:12:01.679 INFO - v2.53.0, with Core v2.53.0. Built from revision unknown
22:12:01.749 INFO - Driver class not found: com.opera.core.systems.OperaDriver
22:12:01.749 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
22:12:01.757 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform VISTA
22:12:02.002 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
22:12:02.002 INFO - Selenium Server is up and running
from htmlunit-driver.
this is something java specific... on windows it's ";" but on linux/mac it's ":"
from htmlunit-driver.
Related Issues (20)
- NoSuchMethodError after quitting or closing driver and then re-calling it? HOT 6
- Angular support for htmlunitdriver ? HOT 1
- Breaking API changes in 4.8.1 HOT 9
- getDomProperty("value") does return "null" whereas getAttribute("value") returns a value HOT 9
- Selenium driver HOT 1
- Test HOT 1
- To ignore - Error during JavaScript execution HOT 3
- How to setting proxy authorization with username/passwd in ubuntu-server 18.04 env HOT 8
- org.htmlunit.ScriptException: SyntaxError: Empty JSON string HOT 9
- HtmlUnitDriver needs to provide WebDriverInfo and DriverService service providers for Selenium 4 Grid HOT 4
- Searching with RelativeLocator does not work HOT 3
- Threading problem when using multiple frames
- Implement HasAuthentication to be able to use authentication HOT 1
- elem.getAttribute("src") should return an empty string if no src attribute is present
- elem.getAttribute("xxx") should return null if no 'xxx' attribute is present
- XPath Not Working Via document.evaluate HOT 4
- Rhino not compiling any JavaScript when ScriptException encountered HOT 7
- Runasync causing deadlock?
- Fetching innerHTML HOT 2
- Script used by RemoteWebElement.isDisplayed() returns 'true' for elements that aren't displayed HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from htmlunit-driver.