@@ -6,13 +6,10 @@ Resource ../resource.robot
66
77*** Test Cases ***
88Should Not Timeout If Callback Invoked Immediately
9- [Documentation] Should Not Timeout If Callback Invoked Immediately
109 ${result } = Execute Async Javascript arguments[arguments.length - 1](123);
1110 Should Be Equal ${result } ${123 }
1211
1312Should Be Able To Return Javascript Primitives From Async Scripts Neither None Nor Undefined
14- [Documentation] Should Be Able To Return Javascript Primitives From Async Scripts
15- ... Neither None Nor Undefined
1613 ${result } = Execute Async Javascript arguments[arguments.length - 1](123);
1714 Should Be Equal ${result } ${123 }
1815 ${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
2320 Should Be Equal ${result } ${true }
2421
2522Should Be Able To Return Javascript Primitives From Async Scripts Null And Undefined
26- [Documentation] Should Be Able To Return Javascript Primitives From Async Scripts
27- ... Null And Undefined
2823 ${result } = Execute Async Javascript arguments[arguments.length - 1](null);
2924 Should Be Equal ${result } ${None }
3025 ${result } = Execute Async Javascript arguments[arguments.length - 1]();
3126 Should Be Equal ${result } ${None }
3227
3328Should Be Able To Return An Array Literal From An Async Script
34- [Documentation] Should Be Able To Return An Array Literal From An Async Script
3529 ${result } = Execute Async Javascript arguments[arguments.length - 1]([]);
3630 Should Not Be Equal ${result } ${None }
3731 Length Should Be ${result } 0
3832
3933Should Be Able To Return An Array Object From An Async Script
40- [Documentation] Should Be Able To Return An Array Object From An Async Script
4134 ${result } = Execute Async Javascript arguments[arguments.length - 1](new Array());
4235 Should Not Be Equal ${result } ${None }
4336 Length Should Be ${result } 0
4437
4538Should Be Able To Return Arrays Of Primitives From Async Scripts
46- [Documentation] Should Be Able To Return Arrays Of Primitives From Async Scripts
4739 ${result } = Execute Async Javascript
4840 ... arguments[arguments.length - 1]([null, 123, 'abc', true, false]);
4941 Should Not Be Equal ${result } ${None }
@@ -61,42 +53,29 @@ Should Be Able To Return Arrays Of Primitives From Async Scripts
6153 Length Should Be ${result } 0
6254
6355Should Timeout If Script Does Not Invoke Callback
64- [Documentation] Should Timeout If Script Does Not Invoke Callback
6556 Run Keyword And Expect Error TimeoutException:* Execute Async Javascript return 1 + 2;
6657
6758Should Timeout If Script Does Not Invoke Callback With A Zero Timeout
68- [Documentation] Should Timeout If Script Does Not Invoke Callback With A Zero Timeout
6959 Run Keyword And Expect Error TimeoutException:* Execute Async Javascript
7060 ... window.setTimeout(function() {}, 0);
7161
7262Should Not Timeout If Script Callsback Inside A Zero Timeout
73- [Documentation] Should Not Timeout If Script Callsback Inside A Zero Timeout
7463 ${result } = Execute Async Javascript
7564 ... var callback = arguments[arguments.length - 1];
7665 ... window.setTimeout(function() { callback(123); }, 0)
7766
7867Should Timeout If Script Does Not Invoke Callback With Long Timeout
79- [Documentation] Should Timeout If Script Does Not Invoke Callback With Long Timeout
8068 Set Selenium Timeout 0.5 seconds
8169 Run Keyword And Expect Error TimeoutException:* Execute Async Javascript
8270 ... var callback = arguments[arguments.length - 1]; window.setTimeout(callback, 1500);
8371
8472Should Detect Page Loads While Waiting On An Async Script And Return An Error
85- [Documentation] Should Detect Page Loads While Waiting On An Async Script
86- ... And Return An Error
8773 Set Selenium Timeout 0.5 seconds
88- Run Keyword And Expect Error WebDriverException:* Execute Async Javascript
74+ ${ status } ${ error } Run Keyword And Ignore Error Execute Async Javascript
8975 ... window.location = 'javascript/dynamic';
76+ Should Match Regexp ${error } (WebDriverException\:|JavascriptException\:)
9077
9178Should Catch Errors When Executing Initial Script
92- [Documentation] Should Catch Errors When Executing Initial Script
93- Run Keyword And Expect Error WebDriverException:* Execute Async Javascript
79+ ${status } ${error } Run Keyword And Ignore Error Execute Async Javascript
9480 ... throw Error('you should catch this!');
95- #TODO Implement Selenium asynchronous javascript test
96- #Should Be Able To Execute Asynchronous Scripts
97- # # To Do
98- #TODO EdManlove Add support for arguement passing to selenium javascript calls
99- #Should Be Able To Pass Multiple Arguments To Async Scripts
100- # ${result} = Execute Async Javascript
101- #... arguments[arguments.length - 1](arguments[0] + arguments[1]); 1 2
102- # Should Be Equal ${result} ${3}
81+ Should Match Regexp ${error } (WebDriverException\:|JavascriptException\:)
0 commit comments