[arquillian-issues] [JBoss JIRA] (ARQGRA-297) Unable to access to WebElement after HTTP request

Sona Jamborova (JIRA) jira-events at lists.jboss.org
Fri Apr 26 10:04:54 EDT 2013


    [ https://issues.jboss.org/browse/ARQGRA-297?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12770412#comment-12770412 ] 

Sona Jamborova commented on ARQGRA-297:
---------------------------------------

<code>
public class MyTest ... {

    @Page
    protected Uberfire uberfire;

    @Test(dependsOnMethods = "setRepo")
    public void myTest() {
         uberfire.login("admin");
    }

}


public class Uberfire {


    @FindBy(css="div#login-content")
    private LoginDialog login;
    
    @FindBy(jquery="div.navbar a:contains('Logout')")
    private WebElement signout;


    
    public void login(String username, String password) {
        login.login(username, "admin");
        GrapheneExtension.pause(5000);
        GrapheneExtension.getDriver().navigate().refresh();    //fix for
        logger.info("ELEMENT SIGNOUT - " + signout.getText());
        //Graphene.waitModel().until().element(signout).is().present();
    }  


}


public class LoginDialog {
    
    @FindBy(css="input[value*='Sign In']")
    private WebElement signin;
    
    @FindBy(css="input[name*='j_username']")
    private WebElement user;
    
    @FindBy(css="input[name*='j_password']")
    private WebElement pasw;
    
    
    public void login(String username, String password) {
        GrapheneExtension.type(user, username);
        GrapheneExtension.type(pasw, password);
        GrapheneExtension.guardHttp(signin).click();
    }
}
</code>
                
> Unable to access to WebElement after HTTP request
> -------------------------------------------------
>
>                 Key: ARQGRA-297
>                 URL: https://issues.jboss.org/browse/ARQGRA-297
>             Project: Arquillian Graphene
>          Issue Type: Bug
>    Affects Versions: 2.0.0.Alpha4
>         Environment: Fedora 16, Firefox/Chrome
>            Reporter: Sona Jamborova
>            Priority: Critical
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the arquillian-issues mailing list