[JBoss JIRA] (ARQGRA-397) Add support for host (ActiveX) objects
by Petr Andreev (JIRA)
Petr Andreev created ARQGRA-397:
-----------------------------------
Summary: Add support for host (ActiveX) objects
Key: ARQGRA-397
URL: https://issues.jboss.org/browse/ARQGRA-397
Project: Arquillian Graphene
Issue Type: Feature Request
Components: core
Affects Versions: 2.0.0.CR2
Environment: WIn7 x64, msxml3.dll (8.110.7601.17988), msxml6.dll (6.30.7601.17988)
IE9 (IE9 in compat mode->IE7)
Richfaces 3.3.4 (Sarissa 0.9.9.3)
Reporter: Petr Andreev
Graphene JavaScript RequestGuard interceptors cause failure of all AJAX requests with Richfaces 3 on InternetExplorer with ActiveXObject version of XMLHttpRequest (overriden by Sarissa included in RF3). There are several issues:
1. While wrapping the underlying XMLHttpRequest (provided by Sarissa and being actually the ActiveXObject) the InterceptedXMLHttpRequest accesses the response fields of XHR, which is illegal for windows-host objects. I.e. responseText throws an error '#575: This method cannot be called until the send method has been called.' The solution would be to not to read the response properties in constructor of InterceptedXMLHttpRequest since at this phase it makes no sense.
2. The bracket- style calls (xhr['send']) on host objects lead to immediate invocation of affected functions without any parameters. Therefore it is impossible to make any reflection-like invocations or checks for existence on them (i.e. if(xhr['send']) or xhr['send'].apply(.....)). The proposed solution is to wrap the host and native objects before 'apply' calls and expand argument list, in that way avoiding failures and ugly browser detection. On the other hand, the invocation of interceptor chain could be refactored (but there could be still problems passing function pointers of host objects: needs to be checked).
IE9 errors: "#450: Wrong number of arguments or invalid property assignment" or "#87: The parameter is incorrect."
3. The scoping of "this" while attaching "onreadystatchange" callback to original (host) XHR is unspecified in contrary to the case with native JS objects. That`s why the interceptors and RF components don`t get notified about completed AJAX request .The solution is simple - just use the wrappers member variable.
4. Overriding the "window.setTimeout" method in RequestGuard causes JS error in IE9 + IE compat mode since there are no 'apply' and 'call' functions defined on window`s host object. The solution is to borrow both functions from Function.prototype- works for native objects too.
Test cases attached (can be ran in http://jsfiddle.net)
Proposed patches attached.
--
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, 6 months
[JBoss JIRA] (ARQGRA-384) element().is().visible() prematurely exits with exception on Android
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-384?page=com.atlassian.jira.plugin... ]
Lukáš Fryč reassigned ARQGRA-384:
---------------------------------
Assignee: Karel Piwko
> element().is().visible() prematurely exits with exception on Android
> --------------------------------------------------------------------
>
> Key: ARQGRA-384
> URL: https://issues.jboss.org/browse/ARQGRA-384
> Project: Arquillian Graphene
> Issue Type: Bug
> Components: core
> Affects Versions: 2.0.0.CR1
> Reporter: Karel Piwko
> Assignee: Karel Piwko
> Fix For: 2.0.1.Final
>
>
> When using following call using Graphene and AndroidDriver, it often fails with an exception on Android:
> {code}
> waitGui().withMessage("Add member button is not yet present.").until().element(addMemberBtn).is().visible();
> {code}
> {code}
> addUser(com.acme.example.test.DroneTest) Time elapsed: 8.491 sec <<< ERROR!
> org.openqa.selenium.WebDriverException: Returned value cannot be converted to Boolean: [org.openqa.selenium.remote.RemoteWebElement@30 -> unknown locator]
> Build info: version: '2.35.0', revision: '8df0c6bedf70ff9f22c647788f9fe9c8d22210e2', time: '2013-08-17 12:46:41'
> System info: os.name: 'Linux', os.arch: 'amd64', os.version: '2.6.32-358.18.1.el6.x86_64', java.version: '1.7.0_25'
> Driver info: driver.version: unknown
> at org.openqa.selenium.remote.RemoteWebElement.isDisplayed(RemoteWebElement.java:323)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:159)
> at org.jboss.arquillian.graphene.enricher.SearchContextInterceptor.intercept(SearchContextInterceptor.java:50)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:48)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor$1.apply(StaleElementInterceptor.java:44)
> 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.WebDriverWaitImpl.until(WebDriverWaitImpl.java:87)
> at org.jboss.arquillian.graphene.enricher.StaleElementInterceptor.intercept(StaleElementInterceptor.java:44)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
> at org.jboss.arquillian.graphene.intercept.InterceptorBuilder$2.intercept(InterceptorBuilder.java:139)
> at org.jboss.arquillian.graphene.proxy.InvocationContextImpl.invoke(InvocationContextImpl.java:87)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:209)
> at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:205)
> at com.sun.proxy.$Proxy37.isDisplayed(Unknown Source)
> at org.openqa.selenium.support.ui.ExpectedConditions.elementIfVisible(ExpectedConditions.java:228)
> at org.openqa.selenium.support.ui.ExpectedConditions.access$100(ExpectedConditions.java:39)
> at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:213)
> at org.openqa.selenium.support.ui.ExpectedConditions$7.apply(ExpectedConditions.java:210)
> at org.jboss.arquillian.graphene.condition.BooleanConditionWrapper.apply(BooleanConditionWrapper.java:61)
> at org.jboss.arquillian.graphene.condition.BooleanConditionWrapper.apply(BooleanConditionWrapper.java:37)
> at org.openqa.selenium.support.ui.FluentWait.until(FluentWait.java:208)
> at org.jboss.arquillian.graphene.wait.WebDriverWaitImpl.until(WebDriverWaitImpl.java:102)
> at org.jboss.arquillian.graphene.wait.WebDriverWaitImpl.commit(WebDriverWaitImpl.java:110)
> at org.jboss.arquillian.graphene.wait.IsNotElementBuilderImpl.visible(IsNotElementBuilderImpl.java:57)
> at com.acme.example.test.AddMemberPage.addNewMember(AddMemberPage.java:38)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:130)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$1.invoke(GrapheneContextualHandler.java:159)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler$2.call(GrapheneContextualHandler.java:209)
> at org.jboss.arquillian.graphene.context.BrowserActions.performAction(BrowserActions.java:62)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.invoke(GrapheneContextualHandler.java:205)
> at org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:229)
> at com.acme.example.test.AddMemberPage$$EnhancerByGraphene$$75cffd91.addNewMember(<generated>)
> at com.acme.example.test.DroneTest.addUser(DroneTest.java:25)
> {code}
> This looks like that visibility checker should ignore this exception, as element is in intermediate state at this moment.
--
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, 6 months
[JBoss JIRA] (ARQGRA-392) Update and enhance Graphene guide
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-392?page=com.atlassian.jira.plugin... ]
Lukáš Fryč reassigned ARQGRA-392:
---------------------------------
Assignee: Juraj Húska
> Update and enhance Graphene guide
> ---------------------------------
>
> Key: ARQGRA-392
> URL: https://issues.jboss.org/browse/ARQGRA-392
> Project: Arquillian Graphene
> Issue Type: Enhancement
> Components: doc
> Affects Versions: 2.0.0.CR2
> Reporter: Juraj Húska
> Assignee: Juraj Húska
> Priority: Critical
> Fix For: 2.0.1.Final
>
>
> The Graphene guide at arquillian.org deserves couple of enhancements and updates:
> *enhancements*:
> * make the reference to the reference documentation more explicit - put it under own header, so it appears in the right menu
> * consider referencing a link how to use jboss boms, or boms in general
> *updates*
> * update the versions of the artifacts once the Final is out
> I would suggest to incorporate this improvements after Graphene 2.0.0.Final is released.
--
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, 6 months
[JBoss JIRA] (ARQGRA-353) Integration tests fail on Opera with Graphene Alpha5, Selenium 2.35
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-353?page=com.atlassian.jira.plugin... ]
Work on ARQGRA-353 stopped by Lukáš Fryč.
> Integration tests fail on Opera with Graphene Alpha5, Selenium 2.35
> -------------------------------------------------------------------
>
> Key: ARQGRA-353
> URL: https://issues.jboss.org/browse/ARQGRA-353
> Project: Arquillian Graphene
> Issue Type: Enhancement
> Reporter: Lukáš Fryč
> Assignee: Lukáš Fryč
> Priority: Optional
> Labels: padawan
> Fix For: 2.0.1.Final
>
>
> {code}
> Results :
> Failed tests: testUnstable(org.jboss.arquillian.graphene.ftest.javascript.EnrichmentTestCase): Can't invoke unstable javascript extension: Can't invoke the javacript org.jboss.arquillian.graphene.ftest.javascript.EnrichmentTestCase$Unstable#simple()
> testIncorrectInstallation(org.jboss.arquillian.graphene.ftest.page.extension.PageExtensionTestCase): Expected exception: java.lang.IllegalStateException
> testJQuerySelectorCallingFindByDirectly(org.jboss.arquillian.graphene.ftest.page.extension.JQuerySelectorsPageExtensionTestCase): expected:<[h]1> but was:<[H]1>
> testFindByOnWebElement(org.jboss.arquillian.graphene.ftest.page.extension.JQuerySelectorsPageExtensionTestCase): expected:<[h]1> but was:<[H]1>
> testFindByOnListOfWebElement(org.jboss.arquillian.graphene.ftest.page.extension.JQuerySelectorsPageExtensionTestCase): expected:<[h]1> but was:<[H]1>
> Tests in error:
> testScreenMethods(org.jboss.arquillian.graphene.ftest.javascript.EnrichmentTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.ftest.javascript.EnrichmentTestCase$Screen#getHeight()
> test(org.jboss.arquillian.graphene.ftest.javascript.TestCustomJSInterface): Can't invoke the javacript org.jboss.arquillian.graphene.page.document.Document#getTitle()
> testWithSources(org.jboss.arquillian.graphene.ftest.javascript.JavaScriptPageExtensionTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.ftest.javascript.JavaScriptPageExtensionTestCase$HelloWorld#hello()
> testWithInterfaceDependencies(org.jboss.arquillian.graphene.ftest.javascript.JavaScriptPageExtensionTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.ftest.javascript.JavaScriptPageExtensionTestCase$HelloWorld2#hello()
> testStelenessAndJavascriptOnWebDriver(org.jboss.arquillian.graphene.ftest.webdriver.FindElementTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.ftest.webdriver.FindElementTestCase$JQueryInstallator#install()
> testStelenessAndJavascriptOnWebElement(org.jboss.arquillian.graphene.ftest.webdriver.FindElementTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.ftest.webdriver.FindElementTestCase$JQueryInstallator#install()
> testGuardHttp(org.jboss.arquillian.graphene.ftest.parallel.TestGrapheneUtilitiesParalelly): Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#clearRequestDone()
> testGuardXhr(org.jboss.arquillian.graphene.ftest.parallel.TestGrapheneUtilitiesParalelly): Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#clearRequestDone()
> testGuardHttp(org.jboss.arquillian.graphene.ftest.guard.GuardsTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#clearRequestDone()
> testGuardAjax(org.jboss.arquillian.graphene.ftest.guard.GuardsTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#clearRequestDone()
> testGuardDelayedAjax(org.jboss.arquillian.graphene.ftest.guard.GuardsTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#clearRequestDone()
> testGuardDelayedAjaxProcessing(org.jboss.arquillian.graphene.ftest.guard.GuardsTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#clearRequestDone()
> testGuardDelayedTrigerringAndProcessing(org.jboss.arquillian.graphene.ftest.guard.GuardsTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#clearRequestDone()
> testGuardDelayedAjaxProcessingWithCodeArgument(org.jboss.arquillian.graphene.ftest.guard.GuardsTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#clearRequestDone()
> testGuardAjaxWithRelocation(org.jboss.arquillian.graphene.ftest.guard.GuardsTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#clearRequestDone()
> testGuardHttpFailure(org.jboss.arquillian.graphene.ftest.guard.GuardsTestCase): Unexpected exception, expected<org.jboss.arquillian.graphene.request.RequestGuardException> but was<java.lang.IllegalStateException>
> testGuardNoRequestFailure(org.jboss.arquillian.graphene.ftest.guard.GuardsTestCase): Unexpected exception, expected<org.jboss.arquillian.graphene.request.RequestGuardException> but was<java.lang.IllegalStateException>
> testGuardAjaxFailure(org.jboss.arquillian.graphene.ftest.guard.GuardsTestCase): Unexpected exception, expected<org.jboss.arquillian.graphene.request.RequestGuardException> but was<java.lang.IllegalStateException>
> testDelayedGuardNoRequest(org.jboss.arquillian.graphene.ftest.guard.GuardsTestCase): Unexpected exception, expected<org.jboss.arquillian.graphene.request.RequestGuardException> but was<java.lang.IllegalStateException>
> testGuardNoRequest(org.jboss.arquillian.graphene.ftest.guard.GuardsTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#clearRequestDone()
> testXhr(org.jboss.arquillian.graphene.ftest.guard.RequestGuardTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#getRequestType()
> testHttp(org.jboss.arquillian.graphene.ftest.guard.RequestGuardTestCase): Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#getRequestType()
> testCorrectInstallation(org.jboss.arquillian.graphene.ftest.page.extension.PageExtensionTestCase): com.opera.core.systems.scope.exceptions.ResponseNotReceivedException: No response in a timely fashion
> testDeletion(org.jboss.arquillian.graphene.ftest.enricher.TestHandlingOfStaleElements): com.sun.proxy.$Proxy21 cannot be cast to com.opera.core.systems.OperaWebElement
> testReplacement(org.jboss.arquillian.graphene.ftest.enricher.TestHandlingOfStaleElements): com.sun.proxy.$Proxy21 cannot be cast to com.opera.core.systems.OperaWebElement
> testOneWithJavascript(org.jboss.arquillian.graphene.ftest.enricher.TestGrapheneElement): Can't invoke the javacript org.jboss.arquillian.graphene.ftest.enricher.TestGrapheneElement$TestJavascript#getInnerHtml()
> testListWithJavascript(org.jboss.arquillian.graphene.ftest.enricher.TestGrapheneElement): Can't invoke the javacript org.jboss.arquillian.graphene.ftest.enricher.TestGrapheneElement$TestJavascript#getInnerHtml()
> Tests run: 271, Failures: 5, Errors: 27, Skipped: 0
> {code}
--
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, 6 months