[arquillian-issues] [JBoss JIRA] (ARQGRA-385) Unable to use Guards with AndroidDriver (again)

Karel Piwko (JIRA) jira-events at lists.jboss.org
Mon Sep 30 08:55:03 EDT 2013


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

Karel Piwko commented on ARQGRA-385:
------------------------------------

Adding WebDriver log from Android device.

{code}
LOGCAT: I/AndroidWebDriver(  756): Executing: [get: http://10.34.130.169:8080/html5-demoapp/] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/url)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/url
LOGCAT: I/AndroidWebDriver(  756): Executing: [find element: By.id: addMember] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/element)
LOGCAT: I/dalvikvm-heap(  756): Grow heap (frag case) to 11.589MB for 131080-byte allocation
LOGCAT: I/dalvikvm-heap(  756): Grow heap (frag case) to 11.714MB for 131112-byte allocation
LOGCAT: I/dalvikvm-heap(  756): Grow heap (frag case) to 11.912MB for 196664-byte allocation
LOGCAT: I/dalvikvm-heap(  756): Grow heap (frag case) to 12.212MB for 196664-byte allocation
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/element
LOGCAT: I/AndroidWebDriver(  756): Executing: [is displayed: 0 org.openqa.selenium.android.library.AndroidWebElement at c2c310fa] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/element/0/displayed)
LOGCAT: I/Choreographer(  756): Skipped 38 frames!  The application may be doing too much work on its main thread.
LOGCAT: I/AndroidWebDriver(  756): Executing: [find element: By.id: addMember] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/element)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/element/0/displayed
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/element
LOGCAT: I/AndroidWebDriver(  756): Executing: [find element: By.id: addMember] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/element)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/element
LOGCAT: I/AndroidWebDriver(  756): Executing: [is displayed: 0 org.openqa.selenium.android.library.AndroidWebElement at c2c310fa] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/element/0/displayed)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/element/0/displayed
LOGCAT: I/AndroidWebDriver(  756): Executing: [find element: By.id: addMember] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/element)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/element
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: /* * JBoss, Home of Professional Open Source * Copyright 2013, Red Hat, Inc. and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */function invokeInterface (target, method, args) {    var args = args || [];    try {        if (target) {            /* property getter */            if (!args.length && method.indexOf("get") == 0) {                var property = method.substring(3, method.length);                /* uncapitalize */                property = property.charAt(0).toLowerCase() + property.slice(1);                if (property && target[property]) {                    return target[property];                }            }                        /* property setter */            if (args.length === 1 && method.indexOf("set") == 0) {                var property = method.substring(3, method.length);                /* uncapitalize */                property = property.charAt(0).toLowerCase() + property.slice(1);                if (property && target[property] != undefined) {                    target[property] = args[0];                    return;                }            }            /* method */            if (typeof(target[method]) == "function") {                return target[method].apply(target, args);            }        } else {            throw "target object of invocation is not defined"        }    } catch (e) {        console.log('exception thrown when executing method ' + method + ': ' + e);        /*         * here an exception should be thrown, but it can't be because of         * 'ARQGRA-289: JavaScript interfaces fails on Chrome and PhantomJS'         */        return 'GRAPHENE ERROR: ' + e;    }};return invokeInterface(Graphene.Page.RequestGuard, "clearRequestDone", arguments);, []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: W/AndroidWebDriver(  756): Exception thrown
LOGCAT: W/AndroidWebDriver(  756): org.openqa.selenium.WebDriverException: Error: {"message":"Graphene is not defined"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.throwIfError(AndroidWebDriver.java:1024)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeRawScript(AndroidWebDriver.java:895)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.injectJavascript(AndroidWebDriver.java:930)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeScript(AndroidWebDriver.java:786)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.AndroidApkDriver.executeScript(AndroidApkDriver.java:106)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invokeNative(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invoke(Method.java:511)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:101)
LOGCAT: W/AndroidWebDriver(  756):      at $Proxy1.executeScript(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:209)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:55)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:1)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask.run(FutureTask.java:137)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.Thread.run(Thread.java:856)
LOGCAT: W/AndroidWebDriver(  756): Exception: Error: {"message":"Graphene is not defined"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: return (typeof Graphene != 'undefined') && (typeof Graphene.Page != 'undefined') && (typeof Graphene.Page.RequestGuard != 'undefined'), []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: return (typeof Graphene != 'undefined') && (typeof Graphene.xhrInterception != 'undefined'), []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: /* * JBoss, Home of Professional Open Source * Copyright 2013, Red Hat, Inc. and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */window.Graphene = window.Graphene || {};/** * The XMLHttpRequest injection providing ability to intercept requests. */window.Graphene.xhrInterception = (function() {    /**     * The backup of original XHR object after injection     */    var original;    /**     * Flags for different implementations of XHR     */    var isXHR = !!window.XMLHttpRequest;    var isActiveX = !!window.ActiveXObject;    /**     * The hash of arrays of functions (with method names to intercept like keys)     */    var interceptors = {};    /**     * The prototype of injected XHR object.     *     * Delegates to intercepter chain.     */    var wrapperPrototype = {        abort : function() {            return invokeInterceptorChain(this, 'abort', arguments);        },        open : function() {            return invokeInterceptorChain(this, 'open', arguments);        },        getAllResponseHeaders : function() {            return invokeInterceptorChain(this, 'getAllResponseHeaders', arguments);        },        getResponseHeader : function() {            return invokeInterceptorChain(this, 'getResponseHeader', arguments);        },        send : function() {            return invokeInterceptorChain(this, 'send', arguments);        },        setRequestHeader : function() {            return invokeInterceptorChain(this, 'setRequestHeader', arguments);        },        onreadystatechange : undefined    };    /**     * Injects XHR wrapper for Firefox/Chromium/WebKit and similar browsers     */    var replaceXHR = function() {        original = window.XMLHttpRequest;        window.XMLHttpRequest = createReplacement();    };    /**     * Reverts XHR wrapper for Firefox/Chromium/WebKit and similar browsers     */    var revertXHR = function() {        window.XMLHttpRequest = original;        original = undefined;    };    /**     * Creates XHR wrapper for replacement of original XHR object     */    var createReplacement = function() {        var InterceptedXMLHttpRequest = function InterceptedXMLHttpRequest() {            this.xhr = invokeInterceptorChain(this, 'construct');            this.readyState = this.xhr.readyState;            this.response = this.xhr.response;            this.responseText = this.xhr.responseText;            this.responseType = this.xhr.responseType;            this.responseXML = this.xhr.responseXML;            this.status = this.xhr.status;            this.statusText = this.xhr.statusText;            this.xhr.onreadystatechange = callback(this);        };        InterceptedXMLHttpRequest.prototype = wrapperPrototype;        return InterceptedXMLHttpRequest;    };    /**     * onreadystatechange callback which is registered on true XHR instance.     *     * Delegates to intercepter chain.     */    var callback = function(wrapper) {        return function() {            wrapper.readyState = this.readyState;            if (wrapper.readyState == 4) {                wrapper.responseText = this.responseText;                wrapper.responseXML = this.responseXML;                wrapper.status = this
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: return (typeof Graphene != 'undefined') && (typeof Graphene.xhrInterception != 'undefined'), []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: /* * JBoss, Home of Professional Open Source * Copyright 2013, Red Hat, Inc. and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */window.Graphene = window.Graphene || {};window.Graphene.Page = window.Graphene.Page || {};window.Graphene.Page.RequestGuard = (function() {    var requestType = "HTTP";    var requestState = "DONE";        var filters = [];        function replaceTimeout(xhr) {        xhr.originalTimeout = window.setTimeout;        window.setTimeout = function(originalCallback, timeout) {            if (timeout > window.Graphene.Page.RequestGuard.maximumCallbackTimeout) {                xhr.originalTimeout.apply(window, arguments);            } else {                xhr.callbackCount += 1;                                var callbackArguments = [];                for (var i = 0; i < arguments.length; i++) {                    if (i >= 2) {                        callbackArguments.push(arguments[i]);                    }                }                    xhr.originalTimeout.call(window, function() {                    try {                        replaceTimeout(xhr);                        if (typeof(originalCallback) == 'string') {                            window.eval(originalCallback);                        } else {                            originalCallback(callbackArguments);                        }                    } finally {                        revertTimeout(xhr);                        xhr.callbackCount -= 1;                        xhr.tryFinish();                    }                }, timeout);            }        }    }        function revertTimeout(xhr) {        window.setTimeout = xhr.originalTimeout;        xhr.originalTimeout = null;    }        function enhanceXhrObject(xhr) {        xhr.guarded = true;        xhr.callbackCount = 0;        xhr.changeState = function(type, state) {            if (this.guarded) {                requestType = type;                requestState = state;            }        };        xhr.tryFinish = function() {            if (this.callbackCount === 0) {                this.changeState("XHR", "DONE");            }        };        xhr.proceedWithCallbacks = function(context, args) {            if (this.guarded) {                replaceTimeout(this);                try {                    context.proceed(args);                } finally {                    revertTimeout(this);                }            } else {                context.proceed(args);            }        };        xhr.isGuarded = function() {            for (var i = 0; i < filters.length; i++) {                var filter = filters[i];                try {                    if (!eval(filter)) {                        return false;                    }                } catch (e) {                    console.log('failed to filter XHR request "' + filter + '": ' + e.message);                }            }            return true;        };    }    return {                maximumCallbackTimeout : 50,         getRequestType : function() {            return requestType;        },        getRequestState : function() {            return requestState;        },        clearRequestDone : function() {
LOGCAT: W/AndroidWebDriver(  756): Exception thrown
LOGCAT: W/AndroidWebDriver(  756): org.openqa.selenium.WebDriverException: Error: {"message":"Unexpected token return"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.throwIfError(AndroidWebDriver.java:1024)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeRawScript(AndroidWebDriver.java:895)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.injectJavascript(AndroidWebDriver.java:930)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeScript(AndroidWebDriver.java:786)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.AndroidApkDriver.executeScript(AndroidApkDriver.java:106)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invokeNative(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invoke(Method.java:511)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:101)
LOGCAT: W/AndroidWebDriver(  756):      at $Proxy1.executeScript(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:209)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:55)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:1)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask.run(FutureTask.java:137)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.Thread.run(Thread.java:856)
LOGCAT: W/AndroidWebDriver(  756): Exception: Error: {"message":"Unexpected token return"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: /* * JBoss, Home of Professional Open Source * Copyright 2013, Red Hat, Inc. and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */function invokeInterface (target, method, args) {    var args = args || [];    try {        if (target) {            /* property getter */            if (!args.length && method.indexOf("get") == 0) {                var property = method.substring(3, method.length);                /* uncapitalize */                property = property.charAt(0).toLowerCase() + property.slice(1);                if (property && target[property]) {                    return target[property];                }            }                        /* property setter */            if (args.length === 1 && method.indexOf("set") == 0) {                var property = method.substring(3, method.length);                /* uncapitalize */                property = property.charAt(0).toLowerCase() + property.slice(1);                if (property && target[property] != undefined) {                    target[property] = args[0];                    return;                }            }            /* method */            if (typeof(target[method]) == "function") {                return target[method].apply(target, args);            }        } else {            throw "target object of invocation is not defined"        }    } catch (e) {        console.log('exception thrown when executing method ' + method + ': ' + e);        /*         * here an exception should be thrown, but it can't be because of         * 'ARQGRA-289: JavaScript interfaces fails on Chrome and PhantomJS'         */        return 'GRAPHENE ERROR: ' + e;    }};return invokeInterface(Graphene.Page.RequestGuard, "clearRequestDone", arguments);, []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: W/AndroidWebDriver(  756): Exception thrown
LOGCAT: W/AndroidWebDriver(  756): org.openqa.selenium.WebDriverException: Error: {"message":"Cannot read property 'RequestGuard' of undefined"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.throwIfError(AndroidWebDriver.java:1024)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeRawScript(AndroidWebDriver.java:895)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.injectJavascript(AndroidWebDriver.java:930)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeScript(AndroidWebDriver.java:786)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.AndroidApkDriver.executeScript(AndroidApkDriver.java:106)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invokeNative(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invoke(Method.java:511)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:101)
LOGCAT: W/AndroidWebDriver(  756):      at $Proxy1.executeScript(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:209)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:55)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:1)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask.run(FutureTask.java:137)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.Thread.run(Thread.java:856)
LOGCAT: W/AndroidWebDriver(  756): Exception: Error: {"message":"Cannot read property 'RequestGuard' of undefined"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: return (typeof Graphene != 'undefined') && (typeof Graphene.Page != 'undefined') && (typeof Graphene.Page.RequestGuard != 'undefined'), []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: return (typeof Graphene != 'undefined') && (typeof Graphene.xhrInterception != 'undefined'), []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: /* * JBoss, Home of Professional Open Source * Copyright 2013, Red Hat, Inc. and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */window.Graphene = window.Graphene || {};window.Graphene.Page = window.Graphene.Page || {};window.Graphene.Page.RequestGuard = (function() {    var requestType = "HTTP";    var requestState = "DONE";        var filters = [];        function replaceTimeout(xhr) {        xhr.originalTimeout = window.setTimeout;        window.setTimeout = function(originalCallback, timeout) {            if (timeout > window.Graphene.Page.RequestGuard.maximumCallbackTimeout) {                xhr.originalTimeout.apply(window, arguments);            } else {                xhr.callbackCount += 1;                                var callbackArguments = [];                for (var i = 0; i < arguments.length; i++) {                    if (i >= 2) {                        callbackArguments.push(arguments[i]);                    }                }                    xhr.originalTimeout.call(window, function() {                    try {                        replaceTimeout(xhr);                        if (typeof(originalCallback) == 'string') {                            window.eval(originalCallback);                        } else {                            originalCallback(callbackArguments);                        }                    } finally {                        revertTimeout(xhr);                        xhr.callbackCount -= 1;                        xhr.tryFinish();                    }                }, timeout);            }        }    }        function revertTimeout(xhr) {        window.setTimeout = xhr.originalTimeout;        xhr.originalTimeout = null;    }        function enhanceXhrObject(xhr) {        xhr.guarded = true;        xhr.callbackCount = 0;        xhr.changeState = function(type, state) {            if (this.guarded) {                requestType = type;                requestState = state;            }        };        xhr.tryFinish = function() {            if (this.callbackCount === 0) {                this.changeState("XHR", "DONE");            }        };        xhr.proceedWithCallbacks = function(context, args) {            if (this.guarded) {                replaceTimeout(this);                try {                    context.proceed(args);                } finally {                    revertTimeout(this);                }            } else {                context.proceed(args);            }        };        xhr.isGuarded = function() {            for (var i = 0; i < filters.length; i++) {                var filter = filters[i];                try {                    if (!eval(filter)) {                        return false;                    }                } catch (e) {                    console.log('failed to filter XHR request "' + filter + '": ' + e.message);                }            }            return true;        };    }    return {                maximumCallbackTimeout : 50,         getRequestType : function() {            return requestType;        },        getRequestState : function() {            return requestState;        },        clearRequestDone : function() {
LOGCAT: W/AndroidWebDriver(  756): Exception thrown
LOGCAT: W/AndroidWebDriver(  756): org.openqa.selenium.WebDriverException: Error: {"message":"Unexpected token return"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.throwIfError(AndroidWebDriver.java:1024)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeRawScript(AndroidWebDriver.java:895)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.injectJavascript(AndroidWebDriver.java:930)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeScript(AndroidWebDriver.java:786)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.AndroidApkDriver.executeScript(AndroidApkDriver.java:106)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invokeNative(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invoke(Method.java:511)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:101)
LOGCAT: W/AndroidWebDriver(  756):      at $Proxy1.executeScript(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:209)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:55)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:1)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask.run(FutureTask.java:137)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.Thread.run(Thread.java:856)
LOGCAT: W/AndroidWebDriver(  756): Exception: Error: {"message":"Unexpected token return"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: /* * JBoss, Home of Professional Open Source * Copyright 2013, Red Hat, Inc. and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */function invokeInterface (target, method, args) {    var args = args || [];    try {        if (target) {            /* property getter */            if (!args.length && method.indexOf("get") == 0) {                var property = method.substring(3, method.length);                /* uncapitalize */                property = property.charAt(0).toLowerCase() + property.slice(1);                if (property && target[property]) {                    return target[property];                }            }                        /* property setter */            if (args.length === 1 && method.indexOf("set") == 0) {                var property = method.substring(3, method.length);                /* uncapitalize */                property = property.charAt(0).toLowerCase() + property.slice(1);                if (property && target[property] != undefined) {                    target[property] = args[0];                    return;                }            }            /* method */            if (typeof(target[method]) == "function") {                return target[method].apply(target, args);            }        } else {            throw "target object of invocation is not defined"        }    } catch (e) {        console.log('exception thrown when executing method ' + method + ': ' + e);        /*         * here an exception should be thrown, but it can't be because of         * 'ARQGRA-289: JavaScript interfaces fails on Chrome and PhantomJS'         */        return 'GRAPHENE ERROR: ' + e;    }};return invokeInterface(Graphene.Page.RequestGuard, "clearRequestDone", arguments);, []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: W/AndroidWebDriver(  756): Exception thrown
LOGCAT: W/AndroidWebDriver(  756): org.openqa.selenium.WebDriverException: Error: {"message":"Cannot read property 'RequestGuard' of undefined"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.throwIfError(AndroidWebDriver.java:1024)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeRawScript(AndroidWebDriver.java:895)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.injectJavascript(AndroidWebDriver.java:930)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeScript(AndroidWebDriver.java:786)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.AndroidApkDriver.executeScript(AndroidApkDriver.java:106)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invokeNative(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invoke(Method.java:511)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:101)
LOGCAT: W/AndroidWebDriver(  756):      at $Proxy1.executeScript(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:209)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:55)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:1)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask.run(FutureTask.java:137)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.Thread.run(Thread.java:856)
LOGCAT: W/AndroidWebDriver(  756): Exception: Error: {"message":"Cannot read property 'RequestGuard' of undefined"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: return (typeof Graphene != 'undefined') && (typeof Graphene.Page != 'undefined') && (typeof Graphene.Page.RequestGuard != 'undefined'), []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: return (typeof Graphene != 'undefined') && (typeof Graphene.xhrInterception != 'undefined'), []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: /* * JBoss, Home of Professional Open Source * Copyright 2013, Red Hat, Inc. and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */window.Graphene = window.Graphene || {};/** * The XMLHttpRequest injection providing ability to intercept requests. */window.Graphene.xhrInterception = (function() {    /**     * The backup of original XHR object after injection     */    var original;    /**     * Flags for different implementations of XHR     */    var isXHR = !!window.XMLHttpRequest;    var isActiveX = !!window.ActiveXObject;    /**     * The hash of arrays of functions (with method names to intercept like keys)     */    var interceptors = {};    /**     * The prototype of injected XHR object.     *     * Delegates to intercepter chain.     */    var wrapperPrototype = {        abort : function() {            return invokeInterceptorChain(this, 'abort', arguments);        },        open : function() {            return invokeInterceptorChain(this, 'open', arguments);        },        getAllResponseHeaders : function() {            return invokeInterceptorChain(this, 'getAllResponseHeaders', arguments);        },        getResponseHeader : function() {            return invokeInterceptorChain(this, 'getResponseHeader', arguments);        },        send : function() {            return invokeInterceptorChain(this, 'send', arguments);        },        setRequestHeader : function() {            return invokeInterceptorChain(this, 'setRequestHeader', arguments);        },        onreadystatechange : undefined    };    /**     * Injects XHR wrapper for Firefox/Chromium/WebKit and similar browsers     */    var replaceXHR = function() {        original = window.XMLHttpRequest;        window.XMLHttpRequest = createReplacement();    };    /**     * Reverts XHR wrapper for Firefox/Chromium/WebKit and similar browsers     */    var revertXHR = function() {        window.XMLHttpRequest = original;        original = undefined;    };    /**     * Creates XHR wrapper for replacement of original XHR object     */    var createReplacement = function() {        var InterceptedXMLHttpRequest = function InterceptedXMLHttpRequest() {            this.xhr = invokeInterceptorChain(this, 'construct');            this.readyState = this.xhr.readyState;            this.response = this.xhr.response;            this.responseText = this.xhr.responseText;            this.responseType = this.xhr.responseType;            this.responseXML = this.xhr.responseXML;            this.status = this.xhr.status;            this.statusText = this.xhr.statusText;            this.xhr.onreadystatechange = callback(this);        };        InterceptedXMLHttpRequest.prototype = wrapperPrototype;        return InterceptedXMLHttpRequest;    };    /**     * onreadystatechange callback which is registered on true XHR instance.     *     * Delegates to intercepter chain.     */    var callback = function(wrapper) {        return function() {            wrapper.readyState = this.readyState;            if (wrapper.readyState == 4) {                wrapper.responseText = this.responseText;                wrapper.responseXML = this.responseXML;                wrapper.status = this
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: return (typeof Graphene != 'undefined') && (typeof Graphene.xhrInterception != 'undefined'), []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: /* * JBoss, Home of Professional Open Source * Copyright 2013, Red Hat, Inc. and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */function invokeInterface (target, method, args) {    var args = args || [];    try {        if (target) {            /* property getter */            if (!args.length && method.indexOf("get") == 0) {                var property = method.substring(3, method.length);                /* uncapitalize */                property = property.charAt(0).toLowerCase() + property.slice(1);                if (property && target[property]) {                    return target[property];                }            }                        /* property setter */            if (args.length === 1 && method.indexOf("set") == 0) {                var property = method.substring(3, method.length);                /* uncapitalize */                property = property.charAt(0).toLowerCase() + property.slice(1);                if (property && target[property] != undefined) {                    target[property] = args[0];                    return;                }            }            /* method */            if (typeof(target[method]) == "function") {                return target[method].apply(target, args);            }        } else {            throw "target object of invocation is not defined"        }    } catch (e) {        console.log('exception thrown when executing method ' + method + ': ' + e);        /*         * here an exception should be thrown, but it can't be because of         * 'ARQGRA-289: JavaScript interfaces fails on Chrome and PhantomJS'         */        return 'GRAPHENE ERROR: ' + e;    }};return invokeInterface(Graphene.Page.RequestGuard, "clearRequestDone", arguments);, []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: W/AndroidWebDriver(  756): Exception thrown
LOGCAT: W/AndroidWebDriver(  756): org.openqa.selenium.WebDriverException: Error: {"message":"Cannot read property 'RequestGuard' of undefined"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.throwIfError(AndroidWebDriver.java:1024)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeRawScript(AndroidWebDriver.java:895)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.injectJavascript(AndroidWebDriver.java:930)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeScript(AndroidWebDriver.java:786)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.AndroidApkDriver.executeScript(AndroidApkDriver.java:106)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invokeNative(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invoke(Method.java:511)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:101)
LOGCAT: W/AndroidWebDriver(  756):      at $Proxy1.executeScript(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:209)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:55)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:1)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask.run(FutureTask.java:137)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.Thread.run(Thread.java:856)
LOGCAT: W/AndroidWebDriver(  756): Exception: Error: {"message":"Cannot read property 'RequestGuard' of undefined"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: return (typeof Graphene != 'undefined') && (typeof Graphene.Page != 'undefined') && (typeof Graphene.Page.RequestGuard != 'undefined'), []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute
LOGCAT: I/AndroidWebDriver(  756): Executing: [execute script: /* * JBoss, Home of Professional Open Source * Copyright 2013, Red Hat, Inc. and individual contributors * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */function invokeInterface (target, method, args) {    var args = args || [];    try {        if (target) {            /* property getter */            if (!args.length && method.indexOf("get") == 0) {                var property = method.substring(3, method.length);                /* uncapitalize */                property = property.charAt(0).toLowerCase() + property.slice(1);                if (property && target[property]) {                    return target[property];                }            }                        /* property setter */            if (args.length === 1 && method.indexOf("set") == 0) {                var property = method.substring(3, method.length);                /* uncapitalize */                property = property.charAt(0).toLowerCase() + property.slice(1);                if (property && target[property] != undefined) {                    target[property] = args[0];                    return;                }            }            /* method */            if (typeof(target[method]) == "function") {                return target[method].apply(target, args);            }        } else {            throw "target object of invocation is not defined"        }    } catch (e) {        console.log('exception thrown when executing method ' + method + ': ' + e);        /*         * here an exception should be thrown, but it can't be because of         * 'ARQGRA-289: JavaScript interfaces fails on Chrome and PhantomJS'         */        return 'GRAPHENE ERROR: ' + e;    }};return invokeInterface(Graphene.Page.RequestGuard, "clearRequestDone", arguments);, []] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d/execute)
                (E) TestResult
(E) After
        (I) TestContextHandler.createClassContext
        (E) TestClass
        (I) TestContextHandler.createTestContext
        (I) TestContextHandler.createSuiteContext
        (I) ContainerEventController.createAfterContext
        (I) CreationalContextDestroyer.destory
        (O) ClientBeforeAfterLifecycleEventExecuter.on
        (O) DroneDestructor.destroyMethodScopedDrone
(E) AfterClass
        (I) TestContextHandler.createClassContext
        (E) TestClass
        (I) TestContextHandler.createSuiteContext
        (O) ClientBeforeAfterLifecycleEventExecuter.on
        (O) DroneDestructor.destroyClassScopedDrone
        (E) DroneLifecycleEvent
                (O) DroneEnhancer.deenhanceDrone
                (E) DroneEnhancementEvent
                (E) DroneEnhancementEvent
LOGCAT: I/AndroidWebDriver(  756): Executing: [delete session: cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d] at URL: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d)
LOGCAT: W/AndroidWebDriver(  756): Exception thrown
LOGCAT: W/AndroidWebDriver(  756): org.openqa.selenium.WebDriverException: Error: {"message":"Cannot read property 'RequestGuard' of undefined"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.throwIfError(AndroidWebDriver.java:1024)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeRawScript(AndroidWebDriver.java:895)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.injectJavascript(AndroidWebDriver.java:930)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.library.AndroidWebDriver.executeScript(AndroidWebDriver.java:786)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.android.AndroidApkDriver.executeScript(AndroidApkDriver.java:106)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invokeNative(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.reflect.Method.invoke(Method.java:511)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:101)
LOGCAT: W/AndroidWebDriver(  756):      at $Proxy1.executeScript(Native Method)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:209)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:55)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:1)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.FutureTask.run(FutureTask.java:137)
LOGCAT: W/AndroidWebDriver(  756):      at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
LOGCAT: W/AndroidWebDriver(  756):      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
LOGCAT: W/AndroidWebDriver(  756):      at java.lang.Thread.run(Thread.java:856)
LOGCAT: E/webview (  756): Error: WebView.destroy() called while still attached!
LOGCAT: I/AndroidWebDriver(  756): Done: /session/cb7ba976-6c1f-4f84-bb8d-bd83d9c3ea2d
LOGCAT: W/AndroidWebDriver(  756): Exception: Error: {"message":"Cannot read property 'RequestGuard' of undefined"}
LOGCAT: W/AndroidWebDriver(  756): Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
LOGCAT: W/AndroidWebDriver(  756): System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.29-gc497e41', java.version: '0'
LOGCAT: W/AndroidWebDriver(  756): Driver info: driver.version: EventFiringWebDriver
        (E) DroneLifecycleEvent
        (O) ServerSetupObserver.afterTestClass
        (O) ContainerEventController.execute
        (E) ContainerMultiControlEvent
                (O) ContainerDeployController.undeployManaged
                (E) UnDeployDeployment
                        (I) ContainerDeploymentContextHandler.createContainerContext
                        (I) ContainerDeploymentContextHandler.createDeploymentContext
                        (O) ContainerDeployController.undeploy
                        (E) BeforeUnDeploy
                        (E) AfterUnDeploy
                                (O) ServerSetupObserver.handleAfterUndeploy
        (E) ContainerMultiControlEvent
                (O) ContainerLifecycleController.stopManualContainers
        (E) ContainerMultiControlEvent
                (O) ContainerLifecycleController.stopClassContainers
        (O) GrapheneConfigurator.unconfigureGraphene
        (E) GrapheneUnconfigured
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 57.078 sec <<< FAILURE!
addUser(com.acme.example.test.DroneTest)  Time elapsed: 15.677 sec  <<< ERROR!
java.lang.IllegalStateException: Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#clearRequestDone()
        at java.lang.Enum.valueOf(Enum.java:236)
        at org.jboss.arquillian.graphene.request.RequestType.valueOf(RequestType.java:29)
        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.javascript.DefaultExecutionResolver.castStringToEnum(DefaultExecutionResolver.java:130)
        at org.jboss.arquillian.graphene.javascript.DefaultExecutionResolver.castResult(DefaultExecutionResolver.java:117)
        at org.jboss.arquillian.graphene.javascript.DefaultExecutionResolver.execute(DefaultExecutionResolver.java:79)
        at org.jboss.arquillian.graphene.javascript.JSInterfaceHandler.intercept(JSInterfaceHandler.java:58)
        at org.jboss.arquillian.graphene.cglib.ClassImposterizer$ClassWithSuperclassToWorkAroundCglibBug$$EnhancerByGraphene$$239f80e1.clearRequestDone(<generated>)
        at org.jboss.arquillian.graphene.guard.RequestGuardFactory$1.intercept(RequestGuardFactory.java:95)
        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 org.jboss.arquillian.graphene.proxy.GrapheneContextualHandler.intercept(GrapheneContextualHandler.java:229)
        at org.openqa.selenium.remote.RemoteWebElement$$EnhancerByGraphene$$ed59cce5.click(<generated>)
        at com.acme.example.test.AddMemberPage.addNewMember(AddMemberPage.java:41)
        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$$50095be8.addNewMember(<generated>)
        at com.acme.example.test.DroneTest.addUser(DroneTest.java:26)
{code}
                
> Unable to use Guards with AndroidDriver (again)
> -----------------------------------------------
>
>                 Key: ARQGRA-385
>                 URL: https://issues.jboss.org/browse/ARQGRA-385
>             Project: Arquillian Graphene
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.0.0.CR1
>         Environment: Selenium APK 2.32.
>            Reporter: Karel Piwko
>            Priority: Critical
>             Fix For: 2.0.0.Final
>
>
> It is not possible to use Guards on Android driver, it fails with following error:
> {code}
> java.lang.IllegalStateException: Can't invoke the javacript org.jboss.arquillian.graphene.guard.RequestGuardImpl#clearRequestDone()
>         at org.openqa.selenium.android.library.AndroidWebDriver.throwIfError(AndroidWebDriver.java:1024)
>         at org.openqa.selenium.android.library.AndroidWebDriver.executeRawScript(AndroidWebDriver.java:895)
>         at org.openqa.selenium.android.library.AndroidWebDriver.injectJavascript(AndroidWebDriver.java:930)
>         at org.openqa.selenium.android.library.AndroidWebDriver.executeScript(AndroidWebDriver.java:786)
>         at org.openqa.selenium.android.AndroidApkDriver.executeScript(AndroidApkDriver.java:106)
>         at java.lang.reflect.Method.invokeNative(Native Method)
>         at java.lang.reflect.Method.invoke(Method.java:511)
>         at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:101)
>         at $Proxy1.executeScript(Native Method)
>         at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:209)
>         at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:55)
>         at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:1)
>         at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:137)
>         at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:169)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
>         at java.lang.Thread.run(Thread.java:856)
> {code}
> I've tested both *guardAjax(...)* and *guardNoRequest(...)* guards.
> Together with ARQGRA-384, this significantly reduces usability of Graphene when combined with AndroidDriver.

--
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