FeanDoe
FeanDoe

Reputation: 1668

JBrowserDriver takes more than a minute to initialize

I'm using JBrowserDriver to take screenshots from some pages but when I create the driver variable it takes more than a minute (around 70 seconds).

  JBrowserDriver driver = new JBrowserDriver(Settings.builder().
  timezone(Timezone.AMERICA_NEWYORK).build());

I'm running JBrowserDriver directly from Maven when facing this problem

<dependency>
  <groupId>com.machinepublishers</groupId>
  <artifactId>jbrowserdriver</artifactId>
  <version>[0.12.0, 2.0)</version>
</dependency>

Any hints for finding the root cause of this, or common possible causes of this?

Upvotes: 5

Views: 2592

Answers (1)

I had the same problem, but I found a solution. For default JBrowser uses Tor Browser. I set it to Chrome Browser.

WebDriver driver = new JBrowserDriver(Settings.builder().userAgent(UserAgent.CHROME).build());

Try it. In my case I reduced the time to less than 10 seconds. Good luck!

Upvotes: 3

Related Questions