Skip to content

Instantly share code, notes, and snippets.

@lfryc
Forked from jhuska/accordion
Last active December 20, 2015 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lfryc/6120060 to your computer and use it in GitHub Desktop.
Save lfryc/6120060 to your computer and use it in GitHub Desktop.
package org.richfaces.tests.page.fragments.impl;
import org.jboss.arquillian.graphene.enricher.findby.FindBy;
import org.junit.Test;
import org.openqa.selenium.WebElement;
import org.richfaces.tests.page.fragments.impl.accordion.RichFacesAccordion;
public class TestCase {
@Test
public void testFoo(@InitialPage UserSettingsPage settings) {
UserDetails details = settings.switchToUserDetails();
details.setUsername(...);
}
@Location("/user-settings")
public static class UserSettingsPage {
@FindBy
private RichFacesAccordion accordion;
public UserDetails getUserDetails() {
return accordion.switchTo(0).getContent(UserDetails.class);
}
public static class UserDetails {
@FindBy
private WebElement name;
@FindBy
private WebElement age;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment