@@ -255,33 +255,33 @@ module WebDriver
255
255
end
256
256
end
257
257
258
- describe 'execute async script' do
259
- before do
260
- driver . manage . timeouts . script_timeout = 0
261
- driver . navigate . to url_for ( 'ajaxy_page.html' )
262
- end
258
+ not_compliant_on browser : :phantomjs do
259
+ describe 'execute async script' do
260
+ before do
261
+ driver . manage . timeouts . script_timeout = 0
262
+ driver . navigate . to url_for ( 'ajaxy_page.html' )
263
+ end
263
264
264
- it 'should be able to return arrays of primitives from async scripts' do
265
- result = driver . execute_async_script "arguments[arguments.length - 1]([null, 123, 'abc', true, false]);"
266
- expect ( result ) . to eq ( [ nil , 123 , 'abc' , true , false ] )
267
- end
265
+ it 'should be able to return arrays of primitives from async scripts' do
266
+ result = driver . execute_async_script "arguments[arguments.length - 1]([null, 123, 'abc', true, false]);"
267
+ expect ( result ) . to eq ( [ nil , 123 , 'abc' , true , false ] )
268
+ end
268
269
269
- not_compliant_on driver : :phantomjs do
270
270
it 'should be able to pass multiple arguments to async scripts' do
271
271
result = driver . execute_async_script 'arguments[arguments.length - 1](arguments[0] + arguments[1]);' , 1 , 2
272
272
expect ( result ) . to eq ( 3 )
273
273
end
274
- end
275
274
276
- # Edge BUG - https://connect.microsoft.com/IE/feedback/details/1849991/
277
- # Firefox - https://github.com/SeleniumHQ/selenium/issues/2554
278
- not_compliant_on ( { driver : :remote , browser : [ :firefox , :phantomjs ] } ,
279
- { browser : :edge } ) do
280
- it 'times out if the callback is not invoked' do
281
- expect do
282
- # Script is expected to be async and explicitly callback, so this should timeout.
283
- driver . execute_async_script 'return 1 + 2;'
284
- end . to raise_error ( Selenium ::WebDriver ::Error ::ScriptTimeoutError )
275
+ # Edge BUG - https://connect.microsoft.com/IE/feedback/details/1849991/
276
+ # Firefox - https://github.com/SeleniumHQ/selenium/issues/2554
277
+ not_compliant_on ( { driver : :remote , browser : :firefox } ,
278
+ { browser : :edge } ) do
279
+ it 'times out if the callback is not invoked' do
280
+ expect do
281
+ # Script is expected to be async and explicitly callback, so this should timeout.
282
+ driver . execute_async_script 'return 1 + 2;'
283
+ end . to raise_error ( Selenium ::WebDriver ::Error ::ScriptTimeoutError )
284
+ end
285
285
end
286
286
end
287
287
end
0 commit comments