[
https://issues.jboss.org/browse/ARQGRA-297?page=com.atlassian.jira.plugin...
]
Jan Papousek resolved ARQGRA-297.
---------------------------------
Resolution: Won't Fix
I've reproduced the issue, but I think the problem is in your tests.
The application performs HTTP request after login, but that doesn't mean the next page
is fully loaded. The application also performs XHR request and there is a huge amount of
javascript code before the next page is shown. The presented stack trace just means the
requested element (Sign Out) is not available, which can be true at that moment.
I suggest to change your code to:
{code:title=LoginDialog.java}
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) {
user.click();
user.clear();
user.sendKeys(username);
pasw.click();
pasw.clear();
pasw.sendKeys(password);
signin.click();
}
}
{code}
{code:title=Uberfire.java}
public static 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) {
login.login(username, "admin");
Graphene.waitModel().until().element(signout).is().present();
}
}
{code}
The whole code I used to issue reproduction is available on
https://github.com/papousek/graphene-wedriver-issues/tree/ARQGRA-297
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
Assignee: Jan Papousek
Priority: Critical
Fix For: 2.0.0.Alpha5
Attachments: seq1.png, seq2.png, seq3.png
--
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