-
-
Save lfryc/6120060 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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