PhantomJS Embedder

PhantomJS Windows/Mac OS X/Linux native binary embedder

License

License

Categories

Categories

Ant Build Tools Net
GroupId

GroupId

net.anthavio
ArtifactId

ArtifactId

phanbedder-1.9.8
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

PhantomJS Embedder
PhantomJS Windows/Mac OS X/Linux native binary embedder
Project Organization

Project Organization

Anthavio
Source Code Management

Source Code Management

https://github.com/anthavio/phanbedder

Download phanbedder-1.9.8

How to add to project

<!-- https://jarcasting.com/artifacts/net.anthavio/phanbedder-1.9.8/ -->
<dependency>
    <groupId>net.anthavio</groupId>
    <artifactId>phanbedder-1.9.8</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/net.anthavio/phanbedder-1.9.8/
implementation 'net.anthavio:phanbedder-1.9.8:1.0.0'
// https://jarcasting.com/artifacts/net.anthavio/phanbedder-1.9.8/
implementation ("net.anthavio:phanbedder-1.9.8:1.0.0")
'net.anthavio:phanbedder-1.9.8:jar:1.0.0'
<dependency org="net.anthavio" name="phanbedder-1.9.8" rev="1.0.0">
  <artifact name="phanbedder-1.9.8" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.anthavio', module='phanbedder-1.9.8', version='1.0.0')
)
libraryDependencies += "net.anthavio" % "phanbedder-1.9.8" % "1.0.0"
[net.anthavio/phanbedder-1.9.8 "1.0.0"]

Dependencies

test (5)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.5
ch.qos.logback : logback-classic jar 1.1.1
junit : junit jar 4.11
org.assertj : assertj-core jar 1.6.1
com.github.detro.ghostdriver : phantomjsdriver jar 1.1.0

Project Modules

There are no modules declared in this project.

Phanbedder Cloudbees DEV@cloud

Maven Central Coverage Status

Jenkins Jenkins Build Status Drone CI Drone CI Status Codeship Codeship Status Travis CI Build Status

PhantomJS Windows/Linux/MacOSX native binary embedder

Tired of java.lang.IllegalStateException: The path to the driver executable must be set by the phantomjs.binary.path capability/system property/PATH variable; for more information, see https://github.com/ariya/phantomjs/wiki. The latest version can be downloaded from http://phantomjs.org/download.html when creating PhantomJSDriver instance?

This library bundles PhantomJS binaries and unpacks right one for you on any of supported platforms - Linux, Windows and Mac OS X.

Simply with Ghost Driver

	//Phanbedder to the rescue!
		File phantomjs = Phanbedder.unpack();
		DesiredCapabilities dcaps = new DesiredCapabilities();
		dcaps.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, phantomjs.getAbsolutePath());
		PhantomJSDriver driver = new PhantomJSDriver(dcaps);
	//Usual Selenium stuff...
		driver.get("https://www.google.com");
		WebElement query = driver.findElement(By.name("q"));
		query.sendKeys("Phanbedder");
		query.submit();

		Assertions.assertThat(driver.getTitle()).contains("Phanbedder - Google Search");
		driver.quit();

Add maven dependency or download jar. Number 2.1.1 stands for PhantomJS version bundled inside.

    <dependency>
      <groupId>net.anthavio</groupId>
      <artifactId>phanbedder-2.1.1</artifactId>
      <version>1.0.0</version>
    </dependency>
    
    <dependency>
      <groupId>com.github.detro.ghostdriver</groupId>
      <artifactId>phantomjsdriver</artifactId>
      <version>1.1.0</version>
    </dependency>

Previous stable version is 1.9.8

    <dependency>
      <groupId>net.anthavio</groupId>
      <artifactId>phanbedder-1.9.8</artifactId>
      <version>1.0.0</version>
    </dependency>
    
    <dependency>
      <groupId>com.github.detro.ghostdriver</groupId>
      <artifactId>phantomjsdriver</artifactId>
      <version>1.1.0</version>
    </dependency>

Versions

Version
1.0.0