Giter Site home page Giter Site logo

Comments (11)

Alexhha avatar Alexhha commented on July 30, 2024 1

Yes, probably. I think it would be useful to add some warning for windows users, imho.

Anyway, thanks for your help.

from htmlunit-driver.

lukeis avatar lukeis commented on July 30, 2024

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.

Alexhha avatar Alexhha commented on July 30, 2024

But I want to run in standalone mode, not in Grid. Or the command would be the same?

from htmlunit-driver.

lukeis avatar lukeis commented on July 30, 2024

then point your "-jar" to the htmlunit-driver-standalone jar file instead?

from htmlunit-driver.

lukeis avatar lukeis commented on July 30, 2024

and yes, using the -cp way would be the same for non-grid

from htmlunit-driver.

Alexhha avatar Alexhha commented on July 30, 2024

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.

lukeis avatar lukeis commented on July 30, 2024

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.

Alexhha avatar Alexhha commented on July 30, 2024

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.

lukeis avatar lukeis commented on July 30, 2024

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.

Alexhha avatar Alexhha commented on July 30, 2024

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.

lukeis avatar lukeis commented on July 30, 2024

this is something java specific... on windows it's ";" but on linux/mac it's ":"

from htmlunit-driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.