@@ -192,6 +192,7 @@ def test_should_not_be_able_to_locate_by_tag_name_multiple_elements_that_do_not_
192
192
193
193
@pytest .mark .xfail_firefox (reason = "https://github.com/mozilla/geckodriver/issues/2007" )
194
194
@pytest .mark .xfail_remote (reason = "https://github.com/mozilla/geckodriver/issues/2007" )
195
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises NoSuchElementException" )
195
196
def test_finding_asingle_element_by_empty_tag_name_should_throw (driver , pages ):
196
197
pages .load ("formPage.html" )
197
198
with pytest .raises (InvalidSelectorException ):
@@ -200,6 +201,7 @@ def test_finding_asingle_element_by_empty_tag_name_should_throw(driver, pages):
200
201
201
202
@pytest .mark .xfail_firefox (reason = "https://github.com/mozilla/geckodriver/issues/2007" )
202
203
@pytest .mark .xfail_remote (reason = "https://github.com/mozilla/geckodriver/issues/2007" )
204
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari returns an empty list" )
203
205
def test_finding_multiple_elements_by_empty_tag_name_should_throw (driver , pages ):
204
206
pages .load ("formPage.html" )
205
207
with pytest .raises (InvalidSelectorException ):
@@ -273,13 +275,15 @@ def test_should_not_find_element_by_class_when_the_name_queried_is_shorter_than_
273
275
driver .find_element (By .CLASS_NAME , "name_B" )
274
276
275
277
278
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
276
279
def test_finding_asingle_element_by_empty_class_name_should_throw (driver , pages ):
277
280
pages .load ("xhtmlTest.html" )
278
281
msg = r"\/errors#invalid-selector-exception"
279
282
with pytest .raises (InvalidSelectorException , match = msg ):
280
283
driver .find_element (By .CLASS_NAME , "" )
281
284
282
285
286
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
283
287
def test_finding_multiple_elements_by_empty_class_name_should_throw (driver , pages ):
284
288
pages .load ("xhtmlTest.html" )
285
289
with pytest .raises (InvalidSelectorException ):
@@ -292,12 +296,14 @@ def test_finding_asingle_element_by_compound_class_name_should_throw(driver, pag
292
296
driver .find_element (By .CLASS_NAME , "a b" )
293
297
294
298
299
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
295
300
def test_finding_asingle_element_by_invalid_class_name_should_throw (driver , pages ):
296
301
pages .load ("xhtmlTest.html" )
297
302
with pytest .raises (InvalidSelectorException ):
298
303
driver .find_element (By .CLASS_NAME , "!@#$%^&*" )
299
304
300
305
306
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
301
307
def test_finding_multiple_elements_by_invalid_class_name_should_throw (driver , pages ):
302
308
pages .load ("xhtmlTest.html" )
303
309
with pytest .raises (InvalidSelectorException ):
@@ -380,6 +386,7 @@ def test_should_throw_an_exception_when_there_is_no_link_to_click(driver, pages)
380
386
driver .find_element (By .XPATH , "//a[@id='Not here']" )
381
387
382
388
389
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
383
390
def test_should_throw_invalid_selector_exception_when_xpath_is_syntactically_invalid_in_driver_find_element (
384
391
driver , pages
385
392
):
@@ -388,6 +395,7 @@ def test_should_throw_invalid_selector_exception_when_xpath_is_syntactically_inv
388
395
driver .find_element (By .XPATH , "this][isnot][valid" )
389
396
390
397
398
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
391
399
def test_should_throw_invalid_selector_exception_when_xpath_is_syntactically_invalid_in_driver_find_elements (
392
400
driver , pages
393
401
):
@@ -396,6 +404,7 @@ def test_should_throw_invalid_selector_exception_when_xpath_is_syntactically_inv
396
404
driver .find_elements (By .XPATH , "this][isnot][valid" )
397
405
398
406
407
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
399
408
def test_should_throw_invalid_selector_exception_when_xpath_is_syntactically_invalid_in_element_find_element (
400
409
driver , pages
401
410
):
@@ -405,6 +414,7 @@ def test_should_throw_invalid_selector_exception_when_xpath_is_syntactically_inv
405
414
body .find_element (By .XPATH , "this][isnot][valid" )
406
415
407
416
417
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
408
418
def test_should_throw_invalid_selector_exception_when_xpath_is_syntactically_invalid_in_element_find_elements (
409
419
driver , pages
410
420
):
@@ -414,25 +424,29 @@ def test_should_throw_invalid_selector_exception_when_xpath_is_syntactically_inv
414
424
body .find_elements (By .XPATH , "this][isnot][valid" )
415
425
416
426
427
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
417
428
def test_should_throw_invalid_selector_exception_when_xpath_returns_wrong_type_in_driver_find_element (driver , pages ):
418
429
pages .load ("formPage.html" )
419
430
with pytest .raises (InvalidSelectorException ):
420
431
driver .find_element (By .XPATH , "count(//input)" )
421
432
422
433
434
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
423
435
def test_should_throw_invalid_selector_exception_when_xpath_returns_wrong_type_in_driver_find_elements (driver , pages ):
424
436
pages .load ("formPage.html" )
425
437
with pytest .raises (InvalidSelectorException ):
426
438
driver .find_elements (By .XPATH , "count(//input)" )
427
439
428
440
441
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
429
442
def test_should_throw_invalid_selector_exception_when_xpath_returns_wrong_type_in_element_find_element (driver , pages ):
430
443
pages .load ("formPage.html" )
431
444
body = driver .find_element (By .TAG_NAME , "body" )
432
445
with pytest .raises (InvalidSelectorException ):
433
446
body .find_element (By .XPATH , "count(//input)" )
434
447
435
448
449
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
436
450
def test_should_throw_invalid_selector_exception_when_xpath_returns_wrong_type_in_element_find_elements (driver , pages ):
437
451
pages .load ("formPage.html" )
438
452
body = driver .find_element (By .TAG_NAME , "body" )
@@ -504,24 +518,28 @@ def test_should_not_find_elements_by_css_selector_when_there_is_no_such_element(
504
518
assert len (elements ) == 0
505
519
506
520
521
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
507
522
def test_finding_asingle_element_by_empty_css_selector_should_throw (driver , pages ):
508
523
pages .load ("xhtmlTest.html" )
509
524
with pytest .raises (InvalidSelectorException ):
510
525
driver .find_element (By .CSS_SELECTOR , "" )
511
526
512
527
528
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
513
529
def test_finding_multiple_elements_by_empty_css_selector_should_throw (driver , pages ):
514
530
pages .load ("xhtmlTest.html" )
515
531
with pytest .raises (InvalidSelectorException ):
516
532
driver .find_elements (By .CSS_SELECTOR , "" )
517
533
518
534
535
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
519
536
def test_finding_asingle_element_by_invalid_css_selector_should_throw (driver , pages ):
520
537
pages .load ("xhtmlTest.html" )
521
538
with pytest .raises (InvalidSelectorException ):
522
539
driver .find_element (By .CSS_SELECTOR , "//a/b/c[@id='1']" )
523
540
524
541
542
+ @pytest .mark .xfail_safari (reason = "unlike chrome, safari raises TimeoutException" )
525
543
def test_finding_multiple_elements_by_invalid_css_selector_should_throw (driver , pages ):
526
544
pages .load ("xhtmlTest.html" )
527
545
with pytest .raises (InvalidSelectorException ):
0 commit comments