Skip to content

Instantly share code, notes, and snippets.

@lfryc
Created November 5, 2012 14:14
Show Gist options
  • Select an option

  • Save lfryc/4017383 to your computer and use it in GitHub Desktop.

Select an option

Save lfryc/4017383 to your computer and use it in GitHub Desktop.
class MyTabPanel extends TabPanel {
@Item(1)
private UserDetails details;
@Item(2)
private WebElement;
@Item(3)
private Calendar;
public UserDetails getUserDetails() {
return details;
}
}
TabPanel extends DynamicPanel {
// X = UserDetails
X switchTo(X );
@FindBy(".item")
List<WebElement> items;
WebElement getNthPanel(int n) {
return items.get(n);
}
}
UserDetails details = myTabPanel.switchTo(UserDetails.class);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment