[JBoss JIRA] (ARQGRA-297) Unable to access to WebElement after HTTP request
by Sona Jamborova (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-297?page=com.atlassian.jira.plugin... ]
Sona Jamborova edited comment on ARQGRA-297 at 4/26/13 10:08 AM:
-----------------------------------------------------------------
{code:title=MyTest.java|borderStyle=solid}
public class MyTest ... {
@Page
protected Uberfire uberfire;
@Test(dependsOnMethods = "setRepo")
public void myTest() {
uberfire.login("admin");
}
}
{code}
{code:title=Uberfire.java|borderStyle=solid}
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();
}
}
{code}
{code:title=LoginDialog.java|borderStyle=solid}
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}
was (Author: sjamboro):
<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
12 years, 11 months
[JBoss JIRA] (ARQGRA-297) Unable to access to WebElement after HTTP request
by Sona Jamborova (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-297?page=com.atlassian.jira.plugin... ]
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
12 years, 11 months
[JBoss JIRA] (ARQGRA-280) refactor handling of staleness
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-280?page=com.atlassian.jira.plugin... ]
Work on ARQGRA-280 started by Jan Papousek.
> refactor handling of staleness
> ------------------------------
>
> Key: ARQGRA-280
> URL: https://issues.jboss.org/browse/ARQGRA-280
> Project: Arquillian Graphene
> Issue Type: Task
> Affects Versions: 2.0.0.Alpha3
> Reporter: Jan Papousek
> Assignee: Jan Papousek
> Fix For: 2.0.0.Alpha5
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> The current situation of handling staleness is it works purely accidentally in some cases and it prevents any caching of web elements.
> Imagine the following code:
> {code}
> Action action = new Actions(driver).moveToElement(element).build();
> ... // some action causing staleness
> action.perform();
> {code}
> The previous code doesn't throw StaleElementReferenceException only in the case when the action causing staleness finishes before the requested action starts performing and when there is no caching of web elements. Currently Graphene can't force the action to perform again when StaleElementReferenceException is thrown.
> In the case of caching the scenerio would be:
> # element is loaded and put to the cache
> # ... some actions ...
> # action causing staleness is performed
> # the requested action starts performing
> -- cached element is used => StaleElementReferenceException
--
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
12 years, 11 months
[JBoss JIRA] (ARQGRA-280) refactor handling of staleness
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-280?page=com.atlassian.jira.plugin... ]
Jan Papousek edited comment on ARQGRA-280 at 4/26/13 9:36 AM:
--------------------------------------------------------------
One note: -I've tried to make some measurement and using web element directly (unwrapped from Graphene proxy) can cause 20% improvement. So, it's worth caching.-
https://github.com/papousek/arquillian-graphene-performance
was (Author: jpapouse):
One note: I've tried to make some measurement and using web element directly (unwrapped from Graphene proxy) can cause 20% improvement. So, it's worth caching.
> refactor handling of staleness
> ------------------------------
>
> Key: ARQGRA-280
> URL: https://issues.jboss.org/browse/ARQGRA-280
> Project: Arquillian Graphene
> Issue Type: Task
> Affects Versions: 2.0.0.Alpha3
> Reporter: Jan Papousek
> Assignee: Jan Papousek
> Fix For: 2.0.0.Alpha5
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> The current situation of handling staleness is it works purely accidentally in some cases and it prevents any caching of web elements.
> Imagine the following code:
> {code}
> Action action = new Actions(driver).moveToElement(element).build();
> ... // some action causing staleness
> action.perform();
> {code}
> The previous code doesn't throw StaleElementReferenceException only in the case when the action causing staleness finishes before the requested action starts performing and when there is no caching of web elements. Currently Graphene can't force the action to perform again when StaleElementReferenceException is thrown.
> In the case of caching the scenerio would be:
> # element is loaded and put to the cache
> # ... some actions ...
> # action causing staleness is performed
> # the requested action starts performing
> -- cached element is used => StaleElementReferenceException
--
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
12 years, 11 months
[JBoss JIRA] (ARQGRA-280) refactor handling of staleness
by Jan Papousek (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-280?page=com.atlassian.jira.plugin... ]
Jan Papousek commented on ARQGRA-280:
-------------------------------------
One note: I've tried to make some measurement and using web element directly (unwrapped from Graphene proxy) can cause 20% improvement. So, it's worth caching.
> refactor handling of staleness
> ------------------------------
>
> Key: ARQGRA-280
> URL: https://issues.jboss.org/browse/ARQGRA-280
> Project: Arquillian Graphene
> Issue Type: Task
> Affects Versions: 2.0.0.Alpha3
> Reporter: Jan Papousek
> Assignee: Jan Papousek
> Fix For: 2.0.0.Alpha5
>
> Original Estimate: 4 hours
> Remaining Estimate: 4 hours
>
> The current situation of handling staleness is it works purely accidentally in some cases and it prevents any caching of web elements.
> Imagine the following code:
> {code}
> Action action = new Actions(driver).moveToElement(element).build();
> ... // some action causing staleness
> action.perform();
> {code}
> The previous code doesn't throw StaleElementReferenceException only in the case when the action causing staleness finishes before the requested action starts performing and when there is no caching of web elements. Currently Graphene can't force the action to perform again when StaleElementReferenceException is thrown.
> In the case of caching the scenerio would be:
> # element is loaded and put to the cache
> # ... some actions ...
> # action causing staleness is performed
> # the requested action starts performing
> -- cached element is used => StaleElementReferenceException
--
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
12 years, 11 months