Description
Timeout when running a feature using browser automation with Firefox geckodriver.
I think this is due to how Karate v2 builds the arguments to use in ProcessBuilder to run geckodriver, i.e. it leaves a space between "--port" and the actual port number, buit it packs all in a single argument:
public enum W3cBrowserType {
...
GECKODRIVER("geckodriver", "firefox", "geckodriver", 4444, "--port %d"),
W3cDriver class:
command.add(executable);
command.add(browserType.formatPortArg(port));
command.addAll(opts.getAddOptions());
try {
ProcessBuilder pb = new ProcessBuilder(command);
I think the format should be "--port=%d".
The same feature works just finw with karate 1.5.1.
Steps to Reproduce
1 Given a feature file with:
* configure driver = { type: 'geckodriver', headless: false }
Given driver 'https://www.google.com'
- Run it with:
java -jar karate-2.0.9.jar firefox.feature
Expected Behavior
To see the Firefox window open, and navigate to the site URL
Actual Behavior
No Firefox window opens, and feature fails with the message:
Timeout waiting for WebDriver on localhost:4444
Karate Version
2.0.9
Java Version
21.0.7
Operating System
Windows
Description
Timeout when running a feature using browser automation with Firefox geckodriver.
I think this is due to how Karate v2 builds the arguments to use in
ProcessBuilderto run geckodriver, i.e. it leaves a space between "--port" and the actual port number, buit it packs all in a single argument:W3cDriver class:
I think the format should be "--port=%d".
The same feature works just finw with karate 1.5.1.
Steps to Reproduce
1 Given a feature file with:
java -jar karate-2.0.9.jar firefox.featureExpected Behavior
To see the Firefox window open, and navigate to the site URL
Actual Behavior
No Firefox window opens, and feature fails with the message:
Timeout waiting for WebDriver on localhost:4444Karate Version
2.0.9
Java Version
21.0.7
Operating System
Windows