Code Monkey home page Code Monkey logo

jbrowserdriver's Introduction

jBrowserDriver

A programmable, embeddable web browser driver compatible with the Selenium WebDriver spec -- headless, WebKit-based, pure Java

Licensed under the Apache License v2.0 (details).


Download

Get a ZIP archive of a recent release.

Or install via Maven:

<dependency>
  <groupId>com.machinepublishers</groupId>
  <artifactId>jbrowserdriver</artifactId>
  <version>1.1.1</version>
</dependency>

For other install options, see the Central Repository.

Prerequisites

Java 8 with JavaFX:

  • Ubuntu Xenial 16.04 LTS, Debian 8 Jessie (Backports), Debian 9 Stretch:
        sudo apt-get install openjdk-8-jre openjfx
  • Ubuntu Trusty 14.04 LTS:
        sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java8-installer libgtk2.0 libxtst6 libxslt1.1 fonts-freefont-ttf libasound2 && sudo update-alternatives --config java
  • Mac, Windows, Linux:
        install Oracle Java 8 (note: choose either the JRE or JDK but not the "Server JRE" since it doesn't include JavaFX)

Usage

For specific details, refer to the API documentation.

Use this library like any other Selenium WebDriver or RemoteWebDriver. It also works with Selenium Server and Selenium Grid (see example below).

You can optionally create a Settings object, configure it, and pass it to the JBrowserDriver constructor to specify a proxy, request headers, time zone, user agent, or navigator details. By default, the browser mimics the fingerprint of Tor Browser.

Settings can alternately be configured using Java system properties or Selenium Capabilities. See Settings builder documentation for details.

Each instance of JBrowserDriver is backed by a separate Java process.

Example:

import org.openqa.selenium.WebDriver;
import com.machinepublishers.jbrowserdriver.Timezone;
import com.machinepublishers.jbrowserdriver.JBrowserDriver;
import com.machinepublishers.jbrowserdriver.Settings;
    
public class Example {
  public static void main(String[] args) {

    // You can optionally pass a Settings object here,
    // constructed using Settings.Builder
    JBrowserDriver driver = new JBrowserDriver(Settings.builder().
      timezone(Timezone.AMERICA_NEWYORK).build());

    // This will block for the page load and any
    // associated AJAX requests
    driver.get("http://example.com");

    // You can get status code unlike other Selenium drivers.
    // It blocks for AJAX requests and page loads after clicks 
    // and keyboard events.
    System.out.println(driver.getStatusCode());

    // Returns the page source in its current state, including
    // any DOM updates that occurred after page load
    System.out.println(driver.getPageSource());
    
    // Close the browser. Allows this thread to terminate.
    driver.quit();
  }
}

Running from a remote Selenium server:

You can also run JBrowserDriver from a remotely running Selenium server.

First start the remote selenium server(s):

  • If you are running using Selenium standalone mode:

    Start the standalone server: java -classpath "selenium-server-standalone-2.53.0.jar:jBrowserDriver-v0.17.0/dist/*" org.openqa.grid.selenium.GridLauncher -browser browserName=jbrowserdriver,version=1,platform=ANY

  • If you are running using Selenium Grid mode:

    Start the hub: java -jar selenium-server-standalone-2.53.0.jar -role hub

    Start the node: java -classpath "selenium-server-standalone-2.53.0.jar:jBrowserDriver-v0.17.0/dist/*" org.openqa.grid.selenium.GridLauncher -role node http://localhost:4444/grid/register -browser browserName=jbrowserdriver,version=1,platform=ANY

  On Windows, replace the colon in the classpath with a semi-colon.

Whether you are using standalone mode or grid mode, you can use this code to call jBrowserDriver remotely:

import java.net.MalformedURLException;
import java.net.URL;
import org.openqa.selenium.Platform;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import com.machinepublishers.jbrowserdriver.Settings;
import com.machinepublishers.jbrowserdriver.Timezone;

public class Example {
  public static void main(String[] args) throws MalformedURLException {
  
    DesiredCapabilities capabilities = 
        new DesiredCapabilities("jbrowserdriver", "1", Platform.ANY);
    
    // Optionally customize the settings
    capabilities.merge(
        Settings.builder().
        timezone(Timezone.AMERICA_NEWYORK).
        buildCapabilities());
    
    RemoteWebDriver driver = new RemoteWebDriver(
        new URL("http://localhost:4444/wd/hub"), capabilities);
    
    driver.get("http://example.com");
    
    System.out.println(driver.getPageSource());
    
    driver.quit();
  }
}

Building

Install and configure Maven v3.x (which is also available in most Linux package repos) and then from the project root run mvn clean compile install. To use in Eclipse, either import the existing Java project from the root directory or import the Maven pom.xml file. However, if you merely want to use this as a dependency in a separate project, see the Download section.

Contributing

Pull requests are welcome, and we ask people contributing code to agree to the CLA which is similar to the agreement used by the Selenium Project. Signing the CLA is simply a matter of editing the file to add your digital "signature" and adding it to your pull request.

Feel free to discuss bugs and new features by opening a new issue.

Support

Purchase support and development services by contacting [email protected]


Copyright (C) 2014-2018 jBrowserDriver committers

jbrowserdriver's People

Contributors

aluketa avatar arya6000 avatar askvortsov avatar askvortsov-ideas avatar blueice avatar cikorka avatar eichhornchen27 avatar fzakaria avatar glmeece avatar heinousjay avatar hollingsworthd avatar jazzepi avatar medavox avatar nddipiazza avatar qqilihq avatar sarehag avatar taraskovaliv avatar tomcashman avatar trask avatar travis-rodman avatar uarlouski avatar untoldwind avatar valfirst avatar vosmith avatar zipleen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jbrowserdriver's Issues

driver makes JVM crash

"C:\Program Files\Java\jdk1.8.0_65\bin\java" -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 15.0.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_65\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_65\jre\lib\rt.jar;C:\workspaces\intelij\test\out\production\test;C:\workspaces\intelij\test\lib\httpcore-4.4.3.jar;C:\workspaces\intelij\test\lib\httpclient-4.5.1.jar;C:\workspaces\intelij\test\lib\commons-codec-1.9.jar;C:\workspaces\intelij\test\lib\commons-logging-1.2.jar;C:\workspaces\intelij\test\lib\selenium-api-2.48.2.jar;C:\workspaces\intelij\test\lib\jbrowserdriver-0.6.5.jar;C:\workspaces\intelij\test\lib\httpclient-cache-4.5.1.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 15.0.2\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain Try

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000065c84ca0, pid=7632, tid=8352

JRE version: Java(TM) SE Runtime Environment (8.0_65-b17) (build 1.8.0_65-b17)

Java VM: Java HotSpot(TM) 64-Bit Server VM (25.65-b01 mixed mode windows-amd64 compressed oops)

Problematic frame:

C [javafx_font.dll+0x4ca0]

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

An error report file with more information is saved as:

C:\workspaces\intelij\test\hs_err_pid7632.log

If you would like to submit a bug report, please visit:

http://bugreport.java.com/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

After updating to 0.8.1 - Could not find or load main class JBrowserDriverServer

My code uses JBrowserDriver with a maven dependency to it. When I saw there was a new release last week, I updated dependency from 0.7.3 to 0.8.1 and when I tried to run it, I got the error:

"Error: Could not find or load main class com.machinepublishers.jbrowserdriver.JBrowserDriverServer".

Reverting to version 0.7.3 by changing nothing but the version number in my pom.xml fixes the issue (but loses the enchancements and fixes found in the new version).

Is it possible that I should be changing my usage in order to properly use the new version?

Multiple WebView in a same application

Running multiple Java process will require lots of memory. Is there any way to run multiple browsers in a same process and be able to separate cookies/proxies between them?

Cookies are disabled?

Given that I have this in my POM:

<dependency>
     <groupId>com.machinepublishers</groupId>
     <artifactId>jbrowserdriver</artifactId>    
     <version>0.7.1</version>
</dependency>

And I create a very basic JBrowserDriver( without really doing much in the way of configuration) and then running this code:

Builder settings = Settings.builder()
                .timezone(Timezone.AMERICA_DENVER);
JBrowserDriver driver = new JBrowserDriver( settings.build() );
driver.get("https://www.costco.com/LogonForm");
System.out.println(driver.getCurrentUrl());

produces:

WARNING: Cookie rejected [spuid="e788cfbd-aa77-418e-9f0d-81f9dabdadf1", version:0, domain:sellpoints.com, path:/, expiry:Fri Jan 13 15:47:01 MST 2017] Illegal 'domain' attribute "sellpoints.com". Domain of origin: "a.sellpoint.net"
Jan 14, 2016 3:47:01 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Cookie rejected [spuid="aa95dd72-d983-4fb3-b8a8-5ff9aa4d624f", version:0, domain:sellpoints.com, path:/, expiry:Fri Jan 13 15:47:01 MST 2017] Illegal 'domain' attribute "sellpoints.com". Domain of origin: "a.sellpoint.net"
Jan 14, 2016 3:47:01 PM org.apache.http.client.protocol.ResponseProcessCookies processCookies
WARNING: Cookie rejected [spuid="83b6b2e3-4f92-4b3d-b281-0d2bc1c80b8a", version:0, domain:sellpoints.com, path:/, expiry:Fri Jan 13 15:47:01 MST 2017] Illegal 'domain' attribute "sellpoints.com". Domain of origin: "a.sellpoint.net"
http://www.costco.com/cookies-disabled.html

And this isn't only an issue with costco.com -- I have also tried automating the login of 2 other websites too, with no success.

Does this support using on a secure website yet?

Unexpected error when loading content with POST method

I have an heavy HTML5 page which generates 87 requests, a variety of GET and POST.
The page uses jquery a lot.

Except 3 POST request, all requests complete OK.

Those 3 POST requests have the following headers when executed from Firefox:

Host: localhost:8443
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0
Accept: application/json, text/javascript, /; q=0.01
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Content-Type: application/json
X-Requested-With: XMLHttpRequest
Referer: https://localhost:8443/edited
Cookie: JSESSIONID=someID
Connection: keep-alive
Content-Length: 0

The error which is thrown up by JBrowserDriver is the following:

Feb 02, 2016 5:43:10 PM com.sun.webkit.network.URLLoader doRun
WARNING: Unexpected error
java.io.IOException: null: https://localhost:8443/edited/GetEffectiveTokens
at com.machinepublishers.jbrowserdriver.StreamConnection.exec(StreamConnection.java:498)
at com.machinepublishers.jbrowserdriver.StreamConnection.getResponseCode(StreamConnection.java:606)
at com.sun.webkit.network.URLLoader.receiveResponse(Unknown Source)
at com.sun.webkit.network.URLLoader.doRun(Unknown Source)
at com.sun.webkit.network.URLLoader.lambda$run$91(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.webkit.network.URLLoader.run(Unknown Source)[2016-02-02T17:43:10+0200]
at com.sun.webkit.network.NetworkContext.fwkLoad(Unknown Source)
at com.sun.webkit.network.URLLoader.twkDidFinishLoading(Native Method)
at com.sun.webkit.network.URLLoader.notifyDidFinishLoading(Unknown Source)
at com.sun.webkit.network.URLLoader.lambda$didFinishLoading$96(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.http.client.ClientProtocolException
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at com.machinepublishers.jbrowserdriver.StreamConnection.exec(StreamConnection.java:488)
... 17 more
Caused by: org.apache.http.ProtocolException: Content-Length header already present
at org.apache.http.protocol.RequestContent.process(RequestContent.java:96)
at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:132)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:182)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
... 19 more

The parameters of the VM are:
-Djbd.ports=11000-11007
-Djbd.browsergui=true
-Djbd.maxrouteconnections=800
-Djbd.quickrender=false
-Djbd.traceconsole=true
-Djbd.blockads=false

The certificate I use has SAN extension with localhost and 127.0.0.1 inside and is imported in cacerts.
I used also jbd.pemfile with compatible or anything with no change.

Any idea how I could troubleshoot this better?

Simple usage of sendKeys throws InternalError

When using sendKeys I get an internalError. Everything looks like it still works properly, and the browser still fills out the form correctly. This may be more of a cosmetic problem than a serious issue.

jBrowserDriver.get("http://www.google.com/");
jBrowserDriver.findElementById("lst-ib").sendKeys("blah");
[Port 10000] [2016-02-28T00:10:42-0500] [WARNING] java.lang.InternalError
[Port 10000]    at com.machinepublishers.jbrowserdriver.StreamHandler.createURLStreamHandler(StreamHandler.java:90)
[Port 10000]    at java.net.URL.getURLStreamHandler(URL.java:1135)
[Port 10000]    at java.net.URL.<init>(URL.java:592)
[Port 10000]    at java.net.URL.<init>(URL.java:483)
[Port 10000]    at java.net.URL.<init>(URL.java:432)
[Port 10000]    at io.github.lukehutch.fastclasspathscanner.scanner.ClasspathFinder.urlToPath(ClasspathFinder.java:109)
[Port 10000]    at io.github.lukehutch.fastclasspathscanner.scanner.ClasspathFinder.addClasspathElement(ClasspathFinder.java:135)
[Port 10000]    at io.github.lukehutch.fastclasspathscanner.scanner.ClasspathFinder.addClasspathElement(ClasspathFinder.java:186)
[Port 10000]    at io.github.lukehutch.fastclasspathscanner.scanner.classloaderhandler.URLClassLoaderHandler.handle(URLClassLoaderHandler.java:41)
[Port 10000]    at io.github.lukehutch.fastclasspathscanner.scanner.ClasspathFinder.parseSystemClasspath(ClasspathFinder.java:320)
[Port 10000]    at io.github.lukehutch.fastclasspathscanner.scanner.ClasspathFinder.getUniqueClasspathElements(ClasspathFinder.java:357)
[Port 10000]    at com.machinepublishers.jbrowserdriver.JBrowserDriver.<clinit>(JBrowserDriver.java:126)
[Port 10000]    at com.machinepublishers.jbrowserdriver.Robot.keysType(Robot.java:406)
[Port 10000]    at com.machinepublishers.jbrowserdriver.Robot.keysType(Robot.java:396)
[Port 10000]    at com.machinepublishers.jbrowserdriver.ElementServer.sendKeys(ElementServer.java:252)
[Port 10000]    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[Port 10000]    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[Port 10000]    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[Port 10000]    at java.lang.reflect.Method.invoke(Method.java:497)
[Port 10000]    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
[Port 10000]    at sun.rmi.transport.Transport$1.run(Transport.java:200)
[Port 10000]    at sun.rmi.transport.Transport$1.run(Transport.java:197)
[Port 10000]    at java.security.AccessController.doPrivileged(Native Method)
[Port 10000]    at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
[Port 10000]    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
[Port 10000]    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
[Port 10000]    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$256(TCPTransport.java:683)
[Port 10000]    at java.security.AccessController.doPrivileged(Native Method)
[Port 10000]    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
[Port 10000]    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[Port 10000]    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[Port 10000]    at java.lang.Thread.run(Thread.java:745)

Simple example does not work

Using the example from the Readme does not work. This is my code.

public class Main {
    public static void main(String[] args) {
        JBrowserDriver driver = new JBrowserDriver(Settings.builder().
                timezone(Timezone.AMERICA_NEWYORK).build());
        driver.get("http://example.com");
        System.out.println(driver.getStatusCode());
        System.out.println(driver.getPageSource());
        driver.quit();
    }
}

This is the exception that I get. I had a local firewall on and thought that might be the issue, but I had allowed the connection through, and then I also disabled the firewall and it did not help.

[Port 10000] Exception in thread "main" java.lang.NullPointerException
[Port 10000]    at com.machinepublishers.jbrowserdriver.LogsServer.exception(LogsServer.java:110)
[Port 10000]    at com.machinepublishers.jbrowserdriver.JBrowserDriverServer.main(JBrowserDriverServer.java:97)
This is my build.gradle file.

group 'test'
version '1.0-SNAPSHOT'

apply plugin: 'java'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.machinepublishers:jbrowserdriver:0.10.1'
    testCompile group: 'junit', name: 'junit', version: '4.11'
}

[Port 10000] Error: Could not find or load main class com.machinepublishers.jbrowserdriver.JBrowserDriverServer on MAC OSX with jetty server maven plugin

I am using JBrowserDriver on mac osx and i run my application on jetty maven plugin.
I am using maven and 0.9.1 version of JBrowserDriver
JBrowserDriver and selenium works fine when i run it as java application but it fails with error when i run it on server. It works with firefox driver on jetty server for example.
error message:
[Port 10000] Error: Could not find or load main class com.machinepublishers.jbrowserdriver.JBrowserDriverServer

use by.xpath , error

java code ---------------------------------------------------------------

WebElement link = driver.findElement(By.xpath("//a[contains(@href,'43590350906')]"));

error --------------------------------------------------------------------

Exception in thread "main" com.machinepublishers.browser.Browser$Retry: java.lang.NullPointerException
at com.machinepublishers.jbrowserdriver.Element.(Element.java:79)
at com.machinepublishers.jbrowserdriver.Element$14.perform(Element.java:332)
at com.machinepublishers.jbrowserdriver.Element$14.perform(Element.java:1)
at com.machinepublishers.jbrowserdriver.Util$Runner.run(Util.java:104)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$47/18938442.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$46/12275192.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$145(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$36/3406560.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at com.machinepublishers.jbrowserdriver.Element.(Element.java:74)
... 13 more

StackOverflowError in setSize

Caused by: java.lang.StackOverflowError
[Port 10000] at com.machinepublishers.jbrowserdriver.WindowServer.setSize(WindowServer.java:146)
[Port 10000] at com.machinepublishers.jbrowserdriver.WindowServer.setSize(WindowServer.java:146)
[Port 10000] at com.machinepublishers.jbrowserdriver.WindowServer.setSize(WindowServer.java:146)
[Port 10000] at com.machinepublishers.jbrowserdriver.WindowServer.setSize(WindowServer.java:146)

I think this line 146 should be

setSize(dimension.toSelenium());

How to embed jBrowserDriver on Swing jFrame

I want to embed browser on jFrame or other components of Java Swing, it helps view web more easy for user and easy for control mutil-browser. Can this driver can do it? Thanks

Enable getLocation and getSize for WebElement

I need t get the location and position of the WebElements that I'm extracting. Is it possible to enable it? If you know how we can discuss and I will implement it by myself.

thanks

Applet support

Java Applets are not supported and this is not easily implemented (ideally Oracle would add general support to JavaFX). Attempt to find a workaround or build out our own support for them.

Cookies set with JS don't work

Cookies set on the client side don't work. Only cookies set by the server take effect. Need to set a cookie manager that extends Java's CookieHandler and implements Apache's CookieStore.

JBrowserDriver Exception in thread

When i execute code with

mvn test -Djbd.browsergui=false -Djbd.quickrender=false -Djbd.traceconsole=true

and i take after execute code.

Exception in thread "Thread-3" java.lang.NullPointerException
    at com.machinepublishers.jbrowserdriver.JBrowserDriver$1.run(JBrowserDriver.java:284)
    at java.lang.Thread.run(Thread.java:745)

Using WebDriver Definition in my code

public class SeleniumUtils {
    private JBrowserDriver driver;

    public SeleniumUtils(){
        configureWebDriver();
    }
    public JBrowserDriver getDriver(){
        return this.driver;
    }
    public void configureWebDriver(){
        this.driver =new JBrowserDriver(Settings.builder().timezone(Timezone.EUROPE_ISTANBUL).build());
    }
}

I tried on Ubuntu and MacOS and i took same error. Did i make configuration mistake or someting?

CreateProcess error=206, The filename or extension is too long

good idea for a framework. i currently use phantomjs but its is slow and buggy this looks like a better solution.

executing a test i get:

java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.8.0_60\jre\bin\java.exe": CreateProcess error=206, Der Dateiname oder die Erweiterung ist zu lang
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at org.zeroturnaround.exec.ProcessExecutor.invokeStart(ProcessExecutor.java:931)
at org.zeroturnaround.exec.ProcessExecutor.startInternal(ProcessExecutor.java:910)
at org.zeroturnaround.exec.ProcessExecutor.execute(ProcessExecutor.java:860)
at com.machinepublishers.jbrowserdriver.JBrowserDriver$1.run(JBrowserDriver.java:282)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: CreateProcess error=206, Der Dateiname oder die Erweiterung ist zu lang
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(ProcessImpl.java:386)
at java.lang.ProcessImpl.start(ProcessImpl.java:137)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)

I dont want to start another process anyway. Is there a way to disable it?

NPE when setting cookie with no expiry date

com.machinepublishers.jbrowserdriver.Options

54: private static HttpCookie convert(Cookie in) {
55: HttpCookie out = new HttpCookie(in.getName(), in.getValue());
56: out.setDomain(in.getDomain());
57: out.setHttpOnly(in.isHttpOnly());
58: out.setMaxAge(in.getExpiry().getTime() - System.currentTimeMillis());
59: out.setPath(in.getPath());
60: out.setSecure(in.isSecure());
61: out.setValue(in.getValue());
62: out.setVersion(1);
63: return out;
64: }

Setting config options in code rather than through JVM args

It would be very handy to be able to set config options in code rather than as project properties - making things more flexible and easier to customize based on application logic.

Example: jbd.ajaxWait - depending on the site, or the resources needed for the site, different timeouts might be useful. Or jbd.browsergui -

In addition, having all the options be enums in the API would help to quickly lookup which options are available, and the available setters would make it obvious which ones are mutable. As written in a README, there is always room to wonder if the list is complete.

JBrowserDriver not found on Tomcat

Hi!

Error: Could not find or load main class com.machinepublishers.jbrowserdriver.JBrowserDriverServer

Just like bug#30

classpath.jars MANIFEST.MF only contains the Tomcat jar

Manifest-Version: 1.0
Class-Path: file:/D:/_dev/java/app/apache-tomcat-8.0.32/bin/bootstrap.
 jar file:/D:/_dev/java/app/apache-tomcat-8.0.32/bin/tomcat-juli.jar f
 ile:/D:/_dev/java/jdk/jdk1.8.0_74/lib/tools.jar

I think use classloader to get the jar path is better way

line 138 in com.machinepublishers.jbrowserdriver.JBrowserDriver

           // peform good in both J2SE and J2EE
            ClassLoader c = JBrowserDriver.class.getClassLoader();
            @SuppressWarnings("resource")
            URLClassLoader u = (URLClassLoader) c;
            URL[] urls = u.getURLs();

            // String[] items =
            // System.getProperty("java.class.path").split(File.pathSeparator);
            final File classpathDir = Files.createTempDirectory("jbd_classpath_").toFile();
            Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
                @Override
                public void run() {
                    FileUtils.deleteQuietly(classpathDir);
                }
            }));
            Random rand = new SecureRandom();
            List<String> paths = new ArrayList<String>();
            for (int i = 0; i < urls.length; i++) {
                File curItem = new File(urls[i].getPath());
                paths.add(curItem.getAbsoluteFile().toURI().toURL().toExternalForm());
                if (curItem.isFile() && urls[i].getPath().endsWith(".jar")) {
                    try (ZipFile jar = new ZipFile(urls[i].getPath())) {
                        Enumeration<? extends ZipEntry> entries = jar.entries();
                        while (entries.hasMoreElements()) {
                            ZipEntry entry = entries.nextElement();
                            if (entry.getName().endsWith(".jar")) {
                                try (InputStream in = jar.getInputStream(entry)) {
                                    File childJar = new File(classpathDir, Long.toString(Math.abs(rand.nextLong()), Math.min(36, Character.MAX_RADIX)) + ".jar");
                                    Files.copy(in, childJar.toPath());
                                    paths.add(childJar.getAbsoluteFile().toURI().toURL().toExternalForm());
                                    childJar.deleteOnExit();
                                }
                            }
                        }
                    }
                }
            }
...

JBrowserDriver not found on OS X

Error: Could not find or load main class com.machinepublishers.jbrowserdriver.JBrowserDriverServer

The build for Windows has already fixed this problem. But it still persists on OS X.

Host name does not match the certificate subject provided by the peer

I am using the latest JBrowserDriver from here: https://github.com/MachinePublishers/jBrowserDriver.

I want to eliminate the "Host name 'foobar' does not match the certificate subject provided by the peer" exception. Here's what I do with org.apache.http.HttpClient:

TrustStrategy trustStrategy = new TrustSelfSignedStrategy();
SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(trustStrategy).build();
HostnameVerifier hostnameVerifier = NoopHostnameVerifier.INSTANCE;

StatusLine statusLine;
try (CloseableHttpClient httpclient = HttpClients.custom().setSSLContext(sslContext).setSSLHostnameVerifier(hostnameVerifier).build()) {
    HttpGet httpGet = new HttpGet(deviceStatusURI);
    ...
}

Is there a way to do something similar with JBrowserDriver?

NoSuchMethodException: com.sun.webkit.dom.HTMLDocumentImpl.call(java.lang.String, [Ljava.lang.Object;)

Hi,

I am running on Java SE 1.8.0_55 (JDK 8 Update 65). I tried it on update 31 as well and getting the same exception.

com.machinepublishers.browser.Browser$Fatal: Method call failed: call
    at com.machinepublishers.jbrowserdriver.JavaFxObject.call(JavaFxObject.java:166)
    at com.machinepublishers.jbrowserdriver.Element$20.perform(Element.java:631)
    at com.machinepublishers.jbrowserdriver.Element$20.perform(Element.java:1)
    at com.machinepublishers.jbrowserdriver.Util$Runner.run(Util.java:96)
    at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294)
    at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:93)
    at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodException: com.sun.webkit.dom.HTMLDocumentImpl.call(java.lang.String, [Ljava.lang.Object;)
    at java.lang.Class.getDeclaredMethod(Class.java:2130)
    at com.machinepublishers.jbrowserdriver.JavaFxObject.call(JavaFxObject.java:137)
    ... 9 more

Is there any way to switch to iframe?

I see com.machinepublishers.jbrowserdriver.TargetLocator has only stub methods.
Do you have any draft of this?
Or could you please kindly advice how can it be implemented?

Windows OS support

use jBrowserDriver-v0.6.5.jar

A fatal error has been detected by the Java Runtime Environment:

EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000072ed4ca0, pid=3728, tid=2592

JRE version: Java(TM) SE Runtime Environment (8.0_60-b27) (build 1.8.0_60-b27)

Java VM: Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode windows-amd64 compressed oops)

Problematic frame:

C [javafx_font.dll+0x4ca0]

Failed to write core dump. Minidumps are not enabled by default on client versions of Windows

An error report file with more information is saved as:

E:\Code\Test\jBro\hs_err_pid3728.log

If you would like to submit a bug report, please visit:

http://bugreport.java.com/bugreport/crash.jsp

The crash happened outside the Java Virtual Machine in native code.

See problematic frame for where to report the bug.

Problem getting body element with jBrowserDriver

My software is able to use different webdrivers for example ghostdriver, chromedriver, firefoxdriver and so on. In one part of the software, i'm calling a simple json endpoint to get some information about the current request (like httpbin.org). This works fine with all webdrivers except jBrowserDriver.

The code:

            WebElement body = this.webDriver.findElement(By.tagName("body"));
            String jsonTxt = body.getText();

It fails because body is null (NullPointerException).

Using this.webDriver.getPageSource() i get the correct pagesource as string.

<html><head></head><body>{"ip":"xxx.xxx.74.xx4","headers":{"Host":"domain.tld","User-Agent":"Mozilla\/5.0 (Windows NT 6.1; rv:38.0) Gecko\/20100101 Firefox\/38.0","Accept":"text\/html,application\/xhtml+xml,application\/xml;q=0.9,*\/*;q=0.8","Accept-Language":"en-us,en;q=0.5","Accept-Encoding":"gzip, deflate","Dnt":"1","Connection":"keep-alive"}}</body></html>

Why does jBrowserDriver fail to find the body element?

Error initializing QuantumRenderer: no suitable pipeline found (CentOS)

ubuntu 14.04 test success
but
Distributor ID: CentOS
Description: CentOS release 5.8 (Final)
Can't run !

java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
Graphics Device initialization failed for : sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:221)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:205)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:209)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:675)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:695)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$156(LauncherImpl.java:182)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
... 1 more
[2016-01-14T07:58:14+0800] [WARNING] com.machinepublishers.browser.Browser$Fatal: Method call failed: launch
at com.machinepublishers.jbrowserdriver.JavaFxObjectServer.call(JavaFxObjectServer.java:163)
at com.machinepublishers.jbrowserdriver.JavaFxObject.call(JavaFxObject.java:72)
at com.machinepublishers.jbrowserdriver.SettingsManager$1.run(SettingsManager.java:50)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.machinepublishers.jbrowserdriver.JavaFxObjectServer.call(JavaFxObjectServer.java:104)
... 3 more
Caused by: java.lang.RuntimeException: No toolkit found

ExpectedConditions.elementToBeClickable times out

When I use ExpectedConditions.elementToBeClickable, the driver will timeout. For example --
WebElement button = new WebDriverWait(driver,30).until(ExpectedConditions.elementToBeClickable(driver.findElement(By.cssSelector("locator"))));

But the following will work as expected
WebDriverWait(driver,30).until(ExpectedConditions.visibilityOf(driver.findElement(By.cssSelector("locator"))));

Error message:
org.openqa.selenium.TimeoutException: Timed out after 30 seconds waiting for element to be clickable: com.machinepublishers.jbrowserdriver.Element@72035809
Build info: version: '2.52.0', revision: '4c2593cfc3689a7fcd7be52549167e5ccc93ad28', time: '2016-02-11 11:22:43'
System info: host: 'Shawns-MacBook-Pro.local', ip: '172.16.42.181', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.8.0_65'
Driver info: com.machinepublishers.jbrowserdriver.JBrowserDriver
Session ID: 1:10000

at org.openqa.selenium.support.ui.WebDriverWait.timeoutException(WebDriverWait.java:80)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:261)
   ........

hangs for a long time.

I tried to use your tool, even just using the demo code you provide in here - it hangs forever (or at least till I got tired of waiting).

[Feature] Add support for request interceptor

It would be very nice if it would be possible to intercept requests to make some requests checks and abort some kind of requests.

For example: I would like to block only specific javascripts or specific stylesheets which match my patterns. For example: "Block all requests that contain 'google' in their url OR abort all requests that contain 'piwik.php'" At this time I'm using litteProxy for this filtering but this is inefficient. Such a feature would be nice in JBrowserDriver, PhantomJS also has such a feature.

Best regards

Can't create JBrowserDriver - AccessControlExceptions all over the place

Hi!

I just wanted to try out your WebDriver implementation, but when trying to new JBrowserDriver, I get exceptions because of your configured security policy (System.getSecurityManager() returned null before instantiating a new JBrowserDriver).

If the word SecurityManager alone does ring a bell to you, I would be happy to read your ideas :)

But if that's somewhat unexpected, I can try to provide a small example reproducing the problem - and actual stacktraces (would have done that already, but I've very little time right now)

Oh, and I'm supposed to say that detro / ghostdriver sent me :)

Where does browser meta data like caches, cookies and so on get persisted?

Does some data (browser history, caches, cookies, etc.) get persisted? If yes, where and is it possible to persist in-memory, so that the data gets flushed after an instance restart? Maybe it's also possible to define a special data directory and delete this directory afterwards?

Thank you very much for your work! I already tested and worked with many headless browser solutions (also build some by myself) and until now jBrowser seems to be very good.

Exception on most basic spock test from Groovy

This simple groovy script works as expected, but when the same exact code is put into a spock test, it causes the exception shown below. It also causes the unit test to run until manually stopped.

//working script

import com.machinepublishers.jbrowserdriver.JBrowserDriver
println 'start'
def driver = new JBrowserDriver()
driver.quit();
println 'finish'

//failing spock spec

import com.machinepublishers.jbrowserdriver.JBrowserDriver
import spock.lang.Specification

class SandboxSpec extends Specification {

    def "Can we create an instance?"() {
        when:
        println 'start'
        def driver = new JBrowserDriver();
        driver.quit();
        println 'finish'

        then:
        true

    }
}

//Output from spock spec

[Port 10000] Exception in thread "main" java.lang.ExceptionInInitializerError
[Port 10000]    at com.machinepublishers.jbrowserdriver.JBrowserDriverServer.main(JBrowserDriverServer.java:70)
[Port 10000] Caused by: java.lang.ArrayStoreException: org.apache.http.impl.cookie.RFC2965VersionAttributeHandler
[Port 10000]    at org.apache.http.impl.cookie.LaxCookieSpecProvider.create(LaxCookieSpecProvider.java:74)
[Port 10000]    at com.machinepublishers.jbrowserdriver.CookieStore.<clinit>(CookieStore.java:44)
[Port 10000]    ... 1 more

OutOfMemoryError

Hello,

when i execute my code like this

foreach(Urls:url){
  driver.get(url)
}

I get OutOfMemoryError after ~200 iteration;

Exception in thread "JavaFX Application Thread" java.lang.OutOfMemoryError: Java heap space
    at com.sun.javafx.iio.png.PNGImageLoader2.decodePalette(PNGImageLoader2.java:588)
    at com.sun.javafx.iio.png.PNGImageLoader2.load(PNGImageLoader2.java:669)
    at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:364)
    at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:274)
    at com.sun.javafx.webkit.prism.WCImageDecoderImpl.loadFrames(WCImageDecoderImpl.java:173)
    at com.sun.javafx.webkit.prism.WCImageDecoderImpl.loadFrames(WCImageDecoderImpl.java:186)
    at com.sun.javafx.webkit.prism.WCImageDecoderImpl.addImageData(WCImageDecoderImpl.java:109)
    at com.sun.webkit.network.URLLoader.twkDidFinishLoading(Native Method)
    at com.sun.webkit.network.URLLoader.notifyDidFinishLoading(URLLoader.java:838)
    at com.sun.webkit.network.URLLoader.lambda$didFinishLoading$96(URLLoader.java:829)
    at com.sun.webkit.network.URLLoader$$Lambda$157/718162111.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295)
    at com.sun.javafx.application.PlatformImpl$$Lambda$52/1933809392.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294)
    at com.sun.javafx.application.PlatformImpl$$Lambda$51/315822528.run(Unknown Source)
    at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:93)
    at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
    at java.lang.Thread.run(Thread.java:745)
Exception in thread "JavaFX Application Thread" java.lang.OutOfMemoryError: GC overhead limit exceeded
    at java.nio.HeapByteBuffer.<init>(HeapByteBuffer.java:57)
    at java.nio.ByteBuffer.allocate(ByteBuffer.java:335)
    at com.sun.javafx.iio.png.PNGImageLoader2.load(PNGImageLoader2.java:652)
    at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:364)
    at com.sun.javafx.iio.ImageStorage.loadAll(ImageStorage.java:274)
    at com.sun.javafx.webkit.prism.WCImageDecoderImpl.loadFrames(WCImageDecoderImpl.java:173)
    at com.sun.javafx.webkit.prism.WCImageDecoderImpl.loadFrames(WCImageDecoderImpl.java:186)
    at com.sun.javafx.webkit.prism.WCImageDecoderImpl.addImageData(WCImageDecoderImpl.java:109)
    at com.sun.webkit.network.URLLoader.twkDidFinishLoading(Native Method)
    at com.sun.webkit.network.URLLoader.notifyDidFinishLoading(URLLoader.java:838)
    at com.sun.webkit.network.URLLoader.lambda$didFinishLoading$96(URLLoader.java:829)
    at com.sun.webkit.network.URLLoader$$Lambda$157/718162111.run(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295)
    at com.sun.javafx.application.PlatformImpl$$Lambda$52/1933809392.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294)
    at com.sun.javafx.application.PlatformImpl$$Lambda$51/315822528.run(Unknown Source)
    at com.sun.glass.ui.monocle.RunnableProcessor.runLoop(RunnableProcessor.java:93)
    at com.sun.glass.ui.monocle.RunnableProcessor.run(RunnableProcessor.java:51)
    at java.lang.Thread.run(Thread.java:745)
Exception in thread "JavaFX Application Thread" java.lang.OutOfMemoryError: GC overhead limit exceeded

My Configuration on maven for memory

 <configuration>
...
            <argLine>-Xms512m -Xmx512m</argLine>
...
</configuration>

302 Redirect causes authentication not to be passed

I have a strange authentication cycle, which happens like this:

  1. In browser, I do first a https://localhost:8443/globalSite/site1/name?urlParam1=2cdd2b2a-35e7-427a-9d04-eab13741368e&urlParam2=true
    Request headers are:
    Host: localhost:8443
    Connection: keep-alive
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
    Upgrade-Insecure-Requests: 1
    User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.103 Safari/537.36
    Accept-Encoding: gzip, deflate, sdch
  2. Then, the request redirect to a subsite of the same domain, while setting a Session valid for all the global domain, see below

Response headers are:
HTTP/1.1 302 Found
Server: Apache-Coyote/1.1
X-FRAME-OPTIONS: SAMEORIGIN
Set-Cookie: JSESSIONID=FDCCA8754CC613C6BDAEBE7C7A7886C5; Path=/globalSite/; Secure; HttpOnly
Expires: 0
Cache-Control: no-store, no-cache
Cache-Control: post-check=0, pre-check=0
Pragma: no-cache
Location: https://localhost:8443/globalSite/site2/index.html#param=name&urlParam1=2cdd2b2a-35e7-427a-9d04-eab13741368e&urlParam2=true
Content-Type: text/html;charset=UTF-8
Content-Length: 0
Date: Tue, 09 Feb 2016 12:50:13 GMT

While using the 0.8.6 version I can't achieve this functionality, because I think the Session cookie is not set to subsequent requests (?).

The strange thing is that if I try to access directly the redirect link, https://localhost:8443/globalSite/site2/index.html#param=name&urlParam1=2cdd2b2a-35e7-427a-9d04-eab13741368e&urlParam2=true this won't work, because the authentication is only done on the initial request.
If I try to access in a private window the second request, the Form Basic authentication dialogue comes on.

Should I do a complete log for that?

Multiple calls to get(String) not thread safe

The docs could use an example of this?
I.e., can you create one JBrowserDriver and have multiple threads call .get() on it to speed up a web scraping job? When I do this, the JVM crashes in jfxrt.dll :-(

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.