Skip to content
This repository has been archived by the owner on Jul 11, 2022. It is now read-only.

yegor256/phandom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Managed by Zerocracy DevOps By Rultor.com

Build Status

PhantomJS Java DOM Builder

Phandom is a Java DOM builder that uses PhantomJS. For example, you have an HTML page that has to be renderable in a browser and you want to validate this fact:

import com.rexsl.test.XhtmlMatchers;
import org.hamcrest.MatcherAssert;
import org.junit.Test;
import org.phandom.Phandom;
public class HtmlTest {
  @Test
  public void testPageRenderability() {
    MatcherAssert.assertThat(
      new Phandom("<html><body><p>Hey!</p></body></html>").dom(),
      XhtmlMatchers.hasXPath("//p[.='Hey!']")
    );
  }
}

Download and Maven Dependency

Just use this dependency in Maven:

<dependency>
  <groupId>com.jcabi.incubator</groupId>
  <artifactId>phandom</artifactId>
  <version>0.2.2</version>
</dependency>

Or download latest release here.

How to contribute

Fork repository, make changes, send us a pull request. We will review your changes and apply them to the master branch shortly, provided they don't violate our quality standards. To avoid frustration, before sending us your pull request please run full Maven build:

mvn clean install -Pqulice

Got questions?

If you have questions or general suggestions, don't hesitate to submit a new Github issue.