diff --git a/.travis.yml b/.travis.yml index 712f1c015..d014fc6c0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,7 +33,7 @@ matrix: - python: "3.6" env: - BROWSER=chrome - - SELENIUM=3.7.0 + - SELENIUM=3.8.0 - ROBOTFRAMEWORK=3.0.2 - ROBOT_OPTIONS=--dotted - python: "2.7" @@ -45,7 +45,7 @@ matrix: - python: "2.7" env: - BROWSER=chrome - - SELENIUM=3.7.0 + - SELENIUM=3.8.0 - ROBOTFRAMEWORK=2.8.7 - ROBOT_OPTIONS= - python: "3.3" @@ -57,7 +57,7 @@ matrix: - python: "3.3" env: - BROWSER=firefox - - SELENIUM=3.7.0 + - SELENIUM=3.8.0 - ROBOTFRAMEWORK=3.0.2 - ROBOT_OPTIONS="--exclude Known_Issue_Firefox --dotted" before_script: diff --git a/test/acceptance/keywords/async_javascript.robot b/test/acceptance/keywords/async_javascript.robot index 0fc4dca5c..69d78fdea 100644 --- a/test/acceptance/keywords/async_javascript.robot +++ b/test/acceptance/keywords/async_javascript.robot @@ -6,13 +6,10 @@ Resource ../resource.robot *** Test Cases *** Should Not Timeout If Callback Invoked Immediately - [Documentation] Should Not Timeout If Callback Invoked Immediately ${result} = Execute Async Javascript arguments[arguments.length - 1](123); Should Be Equal ${result} ${123} Should Be Able To Return Javascript Primitives From Async Scripts Neither None Nor Undefined - [Documentation] Should Be Able To Return Javascript Primitives From Async Scripts - ... Neither None Nor Undefined ${result} = Execute Async Javascript arguments[arguments.length - 1](123); Should Be Equal ${result} ${123} ${result} = Execute Async Javascript arguments[arguments.length - 1]('abc'); @@ -23,27 +20,22 @@ Should Be Able To Return Javascript Primitives From Async Scripts Neither None N Should Be Equal ${result} ${true} Should Be Able To Return Javascript Primitives From Async Scripts Null And Undefined - [Documentation] Should Be Able To Return Javascript Primitives From Async Scripts - ... Null And Undefined ${result} = Execute Async Javascript arguments[arguments.length - 1](null); Should Be Equal ${result} ${None} ${result} = Execute Async Javascript arguments[arguments.length - 1](); Should Be Equal ${result} ${None} Should Be Able To Return An Array Literal From An Async Script - [Documentation] Should Be Able To Return An Array Literal From An Async Script ${result} = Execute Async Javascript arguments[arguments.length - 1]([]); Should Not Be Equal ${result} ${None} Length Should Be ${result} 0 Should Be Able To Return An Array Object From An Async Script - [Documentation] Should Be Able To Return An Array Object From An Async Script ${result} = Execute Async Javascript arguments[arguments.length - 1](new Array()); Should Not Be Equal ${result} ${None} Length Should Be ${result} 0 Should Be Able To Return Arrays Of Primitives From Async Scripts - [Documentation] Should Be Able To Return Arrays Of Primitives From Async Scripts ${result} = Execute Async Javascript ... arguments[arguments.length - 1]([null, 123, 'abc', true, false]); Should Not Be Equal ${result} ${None} @@ -61,42 +53,29 @@ Should Be Able To Return Arrays Of Primitives From Async Scripts Length Should Be ${result} 0 Should Timeout If Script Does Not Invoke Callback - [Documentation] Should Timeout If Script Does Not Invoke Callback Run Keyword And Expect Error TimeoutException:* Execute Async Javascript return 1 + 2; Should Timeout If Script Does Not Invoke Callback With A Zero Timeout - [Documentation] Should Timeout If Script Does Not Invoke Callback With A Zero Timeout Run Keyword And Expect Error TimeoutException:* Execute Async Javascript ... window.setTimeout(function() {}, 0); Should Not Timeout If Script Callsback Inside A Zero Timeout - [Documentation] Should Not Timeout If Script Callsback Inside A Zero Timeout ${result} = Execute Async Javascript ... var callback = arguments[arguments.length - 1]; ... window.setTimeout(function() { callback(123); }, 0) Should Timeout If Script Does Not Invoke Callback With Long Timeout - [Documentation] Should Timeout If Script Does Not Invoke Callback With Long Timeout Set Selenium Timeout 0.5 seconds Run Keyword And Expect Error TimeoutException:* Execute Async Javascript ... var callback = arguments[arguments.length - 1]; window.setTimeout(callback, 1500); Should Detect Page Loads While Waiting On An Async Script And Return An Error - [Documentation] Should Detect Page Loads While Waiting On An Async Script - ... And Return An Error Set Selenium Timeout 0.5 seconds - Run Keyword And Expect Error WebDriverException:* Execute Async Javascript + ${status} ${error} Run Keyword And Ignore Error Execute Async Javascript ... window.location = 'javascript/dynamic'; + Should Match Regexp ${error} (WebDriverException\:|JavascriptException\:) Should Catch Errors When Executing Initial Script - [Documentation] Should Catch Errors When Executing Initial Script - Run Keyword And Expect Error WebDriverException:* Execute Async Javascript + ${status} ${error} Run Keyword And Ignore Error Execute Async Javascript ... throw Error('you should catch this!'); - #TODO Implement Selenium asynchronous javascript test - #Should Be Able To Execute Asynchronous Scripts - # # To Do - #TODO EdManlove Add support for arguement passing to selenium javascript calls - #Should Be Able To Pass Multiple Arguments To Async Scripts - # ${result} = Execute Async Javascript - #... arguments[arguments.length - 1](arguments[0] + arguments[1]); 1 2 - # Should Be Equal ${result} ${3} + Should Match Regexp ${error} (WebDriverException\:|JavascriptException\:)