[JBoss JIRA] (ARQGRA-274) The request guard does timeout for delayed requests
by Bernard Labno (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-274?page=com.atlassian.jira.plugin... ]
Bernard Labno commented on ARQGRA-274:
--------------------------------------
I've manually included interception and guard javascripts invoked ...
and it looks like invoking fast several events that trigger ajax (i.e. typing fast and having ajax on keyup - sendKeys) will block sending further requests.
That's why commenting try/catch block from previous post made test pass - there was no fast ajax event.
> The request guard does timeout for delayed requests
> ---------------------------------------------------
>
> Key: ARQGRA-274
> URL: https://issues.jboss.org/browse/ARQGRA-274
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.0.0.Alpha3
> Reporter: Bernard Labno
> Assignee: Lukáš Fryč
> Fix For: 2.0.0.Alpha4
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> In RichFaces, there is request queue which can delay a processing of an user action which avoids overwhelming communication channel.
> This is simply the case where request guard should:
> * wait specified timeout (by default type "Ajax" timeout) for user action to start AJAX request (xhr.open)
> * then wait another timeout (by default type "Ajax" timeout) for AJAX action to complete the request (xhr.readyState == 4)
--
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-274) The request guard does timeout for delayed requests
by Bernard Labno (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-274?page=com.atlassian.jira.plugin... ]
Bernard Labno edited comment on ARQGRA-274 at 4/26/13 5:51 PM:
---------------------------------------------------------------
Ok, I think I've found a trace.
{code:lang=java}
try {
guardAjax(inputA).sendKeys("Any"); //This goes well, cause inputA has ajax tied to keyup which is triggered by sendKeys
} catch (RequestGuardException e) {
fail("Unexpected RequestGuardException");
}
inputB.sendKeys("Anything");
guardAjax(inputB.findElement(By.xpath("//body"))).click();
{code}
{code:lang=xml}
<h:inputTextarea id="inputB" value="#{panelBean.inputText}" onchange="log(event)" onkeyup="log(event)">
<a4j:ajax event="change"/>
</h:inputTextarea>
{code}
So ajax is triggered on "change" event, which is not triggered by sendKeys. To trigger that event I'm trying to imitate "blur" event by clicking on the body. I see that "change" event is logged to javascript console, but no ajax request is happening. So it looks like something is blocking the request on the browser side.
Other observation is that if I comment try/catch block out then test passes.
was (Author: blabno):
Ok, I think I've found a trace.
{code:lang=java}
try {
guardAjax(inputA).sendKeys("Any"); //This goes well, cause inputA has ajax tied to keyup which is triggered by sendKeys
} catch (RequestGuardException e) {
fail("Unexpected RequestGuardException");
}
inputB.sendKeys("Anything");
guardAjax(inputB.findElement(By.xpath("//body"))).click();
{code}
{code:lang=xml}
<h:inputTextarea id="inputB" value="#{panelBean.inputText}" onchange="log(event)" onkeyup="log(event)">
<a4j:ajax event="change"/>
</h:inputTextarea>
{code}
So ajax is triggered on "change" event, which is not triggered by sendKeys. To trigger that event I'm trying to imitate "blur" event by clicking on the body. I see that "change" event is logged to javascript console, but no ajax request is happening. So it looks like something is blocking the request on the browser side.
> The request guard does timeout for delayed requests
> ---------------------------------------------------
>
> Key: ARQGRA-274
> URL: https://issues.jboss.org/browse/ARQGRA-274
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.0.0.Alpha3
> Reporter: Bernard Labno
> Assignee: Lukáš Fryč
> Fix For: 2.0.0.Alpha4
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> In RichFaces, there is request queue which can delay a processing of an user action which avoids overwhelming communication channel.
> This is simply the case where request guard should:
> * wait specified timeout (by default type "Ajax" timeout) for user action to start AJAX request (xhr.open)
> * then wait another timeout (by default type "Ajax" timeout) for AJAX action to complete the request (xhr.readyState == 4)
--
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-274) The request guard does timeout for delayed requests
by Bernard Labno (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-274?page=com.atlassian.jira.plugin... ]
Bernard Labno edited comment on ARQGRA-274 at 4/26/13 5:49 PM:
---------------------------------------------------------------
Ok, I think I've found a trace.
{code:lang=java}
try {
guardAjax(inputA).sendKeys("Any"); //This goes well, cause inputA has ajax tied to keyup which is triggered by sendKeys
} catch (RequestGuardException e) {
fail("Unexpected RequestGuardException");
}
inputB.sendKeys("Anything");
guardAjax(inputB.findElement(By.xpath("//body"))).click();
{code}
{code:lang=xml}
<h:inputTextarea id="inputB" value="#{panelBean.inputText}" onchange="log(event)" onkeyup="log(event)">
<a4j:ajax event="change"/>
</h:inputTextarea>
{code}
So ajax is triggered on "change" event, which is not triggered by sendKeys. To trigger that event I'm trying to imitate "blur" event by clicking on the body. I see that "change" event is logged to javascript console, but no ajax request is happening. So it looks like something is blocking the request on the browser side.
was (Author: blabno):
Ok, I think I've found a trace.
{code:lang=java}
inputB.sendKeys("Anything");
guardAjax(inputB.findElement(By.xpath("//body"))).click();
{code}
{code:lang=xml}
<h:inputTextarea id="inputB" value="#{panelBean.inputText}" onchange="log(event)" onkeyup="log(event)">
<a4j:ajax event="change"/>
</h:inputTextarea>
{code}
So ajax is triggered on "change" event, which is not triggered by sendKeys. To trigger that event I'm trying to imitate "blur" event by clicking on the body. I see that "change" event is logged to javascript console, but no ajax request is happening. So it looks like something is blocking the request on the browser side.
> The request guard does timeout for delayed requests
> ---------------------------------------------------
>
> Key: ARQGRA-274
> URL: https://issues.jboss.org/browse/ARQGRA-274
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.0.0.Alpha3
> Reporter: Bernard Labno
> Assignee: Lukáš Fryč
> Fix For: 2.0.0.Alpha4
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> In RichFaces, there is request queue which can delay a processing of an user action which avoids overwhelming communication channel.
> This is simply the case where request guard should:
> * wait specified timeout (by default type "Ajax" timeout) for user action to start AJAX request (xhr.open)
> * then wait another timeout (by default type "Ajax" timeout) for AJAX action to complete the request (xhr.readyState == 4)
--
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-274) The request guard does timeout for delayed requests
by Bernard Labno (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-274?page=com.atlassian.jira.plugin... ]
Bernard Labno commented on ARQGRA-274:
--------------------------------------
Ok, I think I've found a trace.
{code:lang=java}
inputB.sendKeys("Anything");
guardAjax(inputB.findElement(By.xpath("//body"))).click();
{code}
{code:lang=xml}
<h:inputTextarea id="inputB" value="#{panelBean.inputText}" onchange="log(event)" onkeyup="log(event)">
<a4j:ajax event="change"/>
</h:inputTextarea>
{code}
So ajax is triggered on "change" event, which is not triggered by sendKeys. To trigger that event I'm trying to imitate "blur" event by clicking on the body. I see that "change" event is logged to javascript console, but no ajax request is happening. So it looks like something is blocking the request on the browser side.
> The request guard does timeout for delayed requests
> ---------------------------------------------------
>
> Key: ARQGRA-274
> URL: https://issues.jboss.org/browse/ARQGRA-274
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.0.0.Alpha3
> Reporter: Bernard Labno
> Assignee: Lukáš Fryč
> Fix For: 2.0.0.Alpha4
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> In RichFaces, there is request queue which can delay a processing of an user action which avoids overwhelming communication channel.
> This is simply the case where request guard should:
> * wait specified timeout (by default type "Ajax" timeout) for user action to start AJAX request (xhr.open)
> * then wait another timeout (by default type "Ajax" timeout) for AJAX action to complete the request (xhr.readyState == 4)
--
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-274) The request guard does timeout for delayed requests
by Bernard Labno (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-274?page=com.atlassian.jira.plugin... ]
Bernard Labno edited comment on ARQGRA-274 at 4/26/13 5:28 PM:
---------------------------------------------------------------
Lukas, if I set waitGuardInterval to big enough value then a4j:queue doesn't break ajax guard.
Unfortunately some tests are failing (https://github.com/blabno/graphene-guard-test). Especially the "firstTest" is unpredictable. Sometimes it passes and sometimes it fails.
was (Author: blabno):
Lukas, unfortunately all tests are failing (https://github.com/blabno/graphene-guard-test). Especially the "firstTest" is unpredictable. Sometimes it passes and sometimes it fails.
> The request guard does timeout for delayed requests
> ---------------------------------------------------
>
> Key: ARQGRA-274
> URL: https://issues.jboss.org/browse/ARQGRA-274
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.0.0.Alpha3
> Reporter: Bernard Labno
> Assignee: Lukáš Fryč
> Fix For: 2.0.0.Alpha4
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> In RichFaces, there is request queue which can delay a processing of an user action which avoids overwhelming communication channel.
> This is simply the case where request guard should:
> * wait specified timeout (by default type "Ajax" timeout) for user action to start AJAX request (xhr.open)
> * then wait another timeout (by default type "Ajax" timeout) for AJAX action to complete the request (xhr.readyState == 4)
--
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-274) The request guard does timeout for delayed requests
by Bernard Labno (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-274?page=com.atlassian.jira.plugin... ]
Bernard Labno edited comment on ARQGRA-274 at 4/26/13 5:16 PM:
---------------------------------------------------------------
Lukas, unfortunately all tests are failing (https://github.com/blabno/graphene-guard-test). Especially the "firstTest" is unpredictable. Sometimes it passes and sometimes it fails.
was (Author: blabno):
Lukas, unfortunately all tests are failing (https://github.com/blabno/graphene-guard-test)
> The request guard does timeout for delayed requests
> ---------------------------------------------------
>
> Key: ARQGRA-274
> URL: https://issues.jboss.org/browse/ARQGRA-274
> Project: Arquillian Graphene
> Issue Type: Bug
> Affects Versions: 2.0.0.Alpha3
> Reporter: Bernard Labno
> Assignee: Lukáš Fryč
> Fix For: 2.0.0.Alpha4
>
> Original Estimate: 2 hours
> Remaining Estimate: 2 hours
>
> In RichFaces, there is request queue which can delay a processing of an user action which avoids overwhelming communication channel.
> This is simply the case where request guard should:
> * wait specified timeout (by default type "Ajax" timeout) for user action to start AJAX request (xhr.open)
> * then wait another timeout (by default type "Ajax" timeout) for AJAX action to complete the request (xhr.readyState == 4)
--
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:
---------------------------------------
The test failed after user logs in into the application. There is sequence of screenshot. The screenshots catch a situation in webapplication after sign in to open a new content. This code works correct for Alpha3. The test succeses if I add driver.navigate.refresh() command between context is changed and element on the new page is used. The test execution ends with this exception org.openqa.selenium.WebDriverException:
Can not locate element using selector div.navbar a:contains('Logout') Check out whether it is correct! Build info: version: '2.32.0', revision: '6c40c187d01409a5dc3b7f8251859150c8af0bcb', time: '2013-04-09 10:39:28' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.6.10-2.fc16.x86_64', java.version: '1.6.0_24' Driver info: driver.version: RemoteWebDriver
org.jboss.arquillian.graphene.enricher.findby.ByJQuery.findElements(ByJQuery.java:71)
at org.jboss.arquillian.graphene.enricher.findby.ByJQuery.findElement(ByJQuery.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
at org.jboss.arquillian.graphene.enricher.WebElementUtils.dropProxyAndFindElement(WebElementUtils.java:138)
at org.jboss.arquillian.graphene.enricher.WebElementUtils$5.getTarget(WebElementUtils.java:104)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.getTarget(GrapheneProxyHandler.java:235)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler$1.getTarget(GrapheneProxyHandler.java:171)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler$1.invoke(GrapheneProxyHandler.java:144)
at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:28)
at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:24)
at org.openqa.selenium.support.ui.FluentWait$1.apply(FluentWait.java:177)
at org.openqa.selenium.support.ui.FluentWait$1.apply(FluentWait.java:175)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:175)
at org.jboss.arquillian.graphene.wait.WebDriverWait.until(WebDriverWait.java:85)
at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor.intercept(StaleElementInterceptor.java:24)
at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:73)
at org.jboss.arquillian.graphene.intercept.InterceptorBuilder$2.intercept(InterceptorBuilder.java:107)
at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:73)
at org.jboss.arquillian.graphene.enricher.SearchContextInterceptor.intercept(SearchContextInterceptor.java:42)
at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:73)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invoke(GrapheneProxyHandler.java:178)
at sun.proxy.$Proxy27.getText(Unknown Source)
at org.jboss.qa.brms.jbpm.uberfire.Uberfire.expectLougout(Uberfire.java:90)
at org.jboss.qa.brms.brm.tools.MyTestDesigner.myTest(MyTestDesigner.java:32)
75 lines not shown
Caused by Can't invoke the javacript org.jboss.arquillian.graphene.enricher.findby.JQuerySearchContext#findElements()
org.jboss.arquillian.graphene.javascript.DefaultExecutionResolver.execute(DefaultExecutionResolver.java:92)
at org.jboss.arquillian.graphene.javascript.JSInterfaceHandler.intercept(JSInterfaceHandler.java:33)
at org.jboss.arquillian.graphene.cglib.ClassImposterizer$ClassWithSuperclassToWorkAroundCglibBug$$EnhancerByGraphene$$68c0d9c3.findElements(<generated>)
at org.jboss.arquillian.graphene.enricher.findby.ByJQuery.findElements(ByJQuery.java:64)
at org.jboss.arquillian.graphene.enricher.findby.ByJQuery.findElement(ByJQuery.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
at org.jboss.arquillian.graphene.enricher.WebElementUtils.dropProxyAndFindElement(WebElementUtils.java:138)
at org.jboss.arquillian.graphene.enricher.WebElementUtils$5.getTarget(WebElementUtils.java:104)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.getTarget(GrapheneProxyHandler.java:235)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler$1.getTarget(GrapheneProxyHandler.java:171)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler$1.invoke(GrapheneProxyHandler.java:144)
at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:28)
at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:24)
at org.openqa.selenium.support.ui.FluentWait$1.apply(FluentWait.java:177)
at org.openqa.selenium.support.ui.FluentWait$1.apply(FluentWait.java:175)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:175)
at org.jboss.arquillian.graphene.wait.WebDriverWait.until(WebDriverWait.java:85)
at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor.intercept(StaleElementInterceptor.java:24)
at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:73)
at org.jboss.arquillian.graphene.intercept.InterceptorBuilder$2.intercept(InterceptorBuilder.java:107)
at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:73)
at org.jboss.arquillian.graphene.enricher.SearchContextInterceptor.intercept(SearchContextInterceptor.java:42)
at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:73)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invoke(GrapheneProxyHandler.java:178)
at sun.proxy.$Proxy27.getText(Unknown Source)
at org.jboss.qa.brms.jbpm.uberfire.Uberfire.expectLougout(Uberfire.java:90)
at org.jboss.qa.brms.brm.tools.MyTestDesigner.myTest(MyTestDesigner.java:32)
75 lines not shown
Caused by exception thrown when executing method 'findElements': target object of invocation is not defined
org.jboss.arquillian.graphene.javascript.DefaultExecutionResolver.executeScriptForCall(DefaultExecutionResolver.java:148)
at org.jboss.arquillian.graphene.javascript.DefaultExecutionResolver.execute(DefaultExecutionResolver.java:86)
at org.jboss.arquillian.graphene.javascript.JSInterfaceHandler.intercept(JSInterfaceHandler.java:33)
at org.jboss.arquillian.graphene.cglib.ClassImposterizer$ClassWithSuperclassToWorkAroundCglibBug$$EnhancerByGraphene$$68c0d9c3.findElements(<generated>)
at org.jboss.arquillian.graphene.enricher.findby.ByJQuery.findElements(ByJQuery.java:64)
at org.jboss.arquillian.graphene.enricher.findby.ByJQuery.findElement(ByJQuery.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:299)
at org.jboss.arquillian.graphene.enricher.WebElementUtils.dropProxyAndFindElement(WebElementUtils.java:138)
at org.jboss.arquillian.graphene.enricher.WebElementUtils$5.getTarget(WebElementUtils.java:104)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.getTarget(GrapheneProxyHandler.java:235)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler$1.getTarget(GrapheneProxyHandler.java:171)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler$1.invoke(GrapheneProxyHandler.java:144)
at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:28)
at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:24)
at org.openqa.selenium.support.ui.FluentWait$1.apply(FluentWait.java:177)
at org.openqa.selenium.support.ui.FluentWait$1.apply(FluentWait.java:175)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:175)
at org.jboss.arquillian.graphene.wait.WebDriverWait.until(WebDriverWait.java:85)
at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor.intercept(StaleElementInterceptor.java:24)
at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:73)
at org.jboss.arquillian.graphene.intercept.InterceptorBuilder$2.intercept(InterceptorBuilder.java:107)
at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:73)
at org.jboss.arquillian.graphene.enricher.SearchContextInterceptor.intercept(SearchContextInterceptor.java:42)
at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:73)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invoke(GrapheneProxyHandler.java:178)
at sun.proxy.$Proxy27.getText(Unknown Source)
at org.jboss.qa.brms.jbpm.uberfire.Uberfire.expectLougout(Uberfire.java:90)
at org.jboss.qa.brms.brm.tools.MyTestDesigner.myTest(MyTestDesigner.java:32)
> 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
> 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
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 edited comment on ARQGRA-297 at 4/26/13 10:10 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) {
login.login(username, "admin");
GrapheneExtension.pause(5000);
GrapheneExtension.getDriver().navigate().refresh(); //add for fix this issue
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: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}
> 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