Skip to content

Instantly share code, notes, and snippets.

@Test
public void table_sort() throws InterruptedException {
// given
browser.get(contextPath.toExternalForm() + "sort.jsf");
WebElement cell = browser.findElements(By.cssSelector(".rf-edt-c-column2 .rf-edt-c-cnt")).get(0);
Assert.assertEquals("9", cell.getText());
guardXhr(sortLink).click();
waitAjax().until(new Predicate<WebDriver> () {
@lfryc
lfryc / WarpAnonymousServerAssertion.java
Created September 4, 2012 13:41 — forked from aslakknutsen/WarpAnonymousServerAssertion.java
Warp rewrite Anonymous ServerAssertions to 'real' classes and transfer to Container. Rewrite 'external' references to client callback
@Travelling
SomeObject obj;
@Test
public void should() {
Warp.execute(new ClientAction() {
public void action() {
page.doAction();
}
}).verify(new ServerAssertion() {
@lfryc
lfryc / TestHandler.java
Created September 3, 2012 19:26 — forked from nallachaitu/lukas.java
test file that contains the javascript test functions
class TestHandler {
static void runQUnitMethod(WebDriver browser, String className, String methodName) {
String url = ...; // compose URL
browser.get("...");
// wait and read results
}
}
@lfryc
lfryc / gist:3508324
Created August 29, 2012 08:06 — forked from bleathem/gist:3508270
Graphene Login component
public class LoginComponent {
@Root
private WebElement driver;
@FindBy(id="loginForm:username")
private WebElement usernameInput;
@FindBy(id="loginForm:password")
private WebElement passwordInput;
@lfryc
lfryc / Pom.xml
Created July 26, 2012 16:11 — forked from nallachaitu/Pom.xml
pom file for drone test
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>org.arquillian.example</groupId>
<artifactId>arquillian-tutorial</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencyManagement>