Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions py/test/selenium/webdriver/common/select_class_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def test_select_by_index_single(driver, pages):
assert sel.first_selected_option.text == select["values"][x]


@pytest.mark.xfail_safari(reason="options incorrectly reported as enabled")
def test_raises_exception_select_by_index_single_disabled(driver, pages):
pages.load("formPage.html")
sel = Select(driver.find_element(By.NAME, disabledSingleSelect["name"]))
Expand All @@ -64,6 +65,7 @@ def test_select_by_value_single(driver, pages):
assert sel.first_selected_option.text == select["values"][x]


@pytest.mark.xfail_safari(reason="options incorrectly reported as enabled")
def test_raises_exception_select_by_value_single_disabled(driver, pages):
pages.load("formPage.html")
sel = Select(driver.find_element(By.NAME, disabledSingleSelect["name"]))
Expand All @@ -82,6 +84,7 @@ def test_select_by_visible_text_single(driver, pages):
assert sel.first_selected_option.text == select["values"][x]


@pytest.mark.xfail_safari(reason="options incorrectly reported as enabled")
def test_raises_exception_select_by_text_single_disabled(driver, pages):
pages.load("formPage.html")
sel = Select(driver.find_element(By.NAME, disabledSingleSelect["name"]))
Expand All @@ -103,6 +106,7 @@ def test_select_by_index_multiple(driver, pages):
assert selected[j].text == select["values"][j]


@pytest.mark.xfail_safari(reason="options incorrectly reported as enabled")
def test_raises_exception_select_by_index_multiple_disabled(driver, pages):
pages.load("formPage.html")

Expand All @@ -125,6 +129,7 @@ def test_select_by_value_multiple(driver, pages):
assert selected[j].text == select["values"][j]


@pytest.mark.xfail_safari(reason="options incorrectly reported as enabled")
def test_raises_exception_select_by_value_multiple_disabled(driver, pages):
pages.load("formPage.html")

Expand All @@ -147,6 +152,7 @@ def test_select_by_visible_text_multiple(driver, pages):
assert selected[j].text == select["values"][j]


@pytest.mark.xfail_safari(reason="options incorrectly reported as enabled")
def test_raises_exception_select_by_text_multiple_disabled(driver, pages):
pages.load("formPage.html")

Expand Down
9 changes: 6 additions & 3 deletions py/test/selenium/webdriver/safari/launcher_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@

import pytest

from selenium.common.exceptions import NoSuchDriverException
from selenium.webdriver.safari.service import Service


def test_launch(driver):
assert driver.capabilities["browserName"] == "Safari"
Expand All @@ -27,9 +30,9 @@ def test_launch(driver):
def test_launch_with_invalid_executable_path_raises_exception(driver_class):
path = "/this/path/should/never/exist"
assert not os.path.exists(path)
with pytest.raises(Exception) as e:
driver_class(executable_path=path)
assert "are you running Safari 10 or later?" in str(e)
service = Service(executable_path=path)
with pytest.raises(NoSuchDriverException):
driver_class(service=service)


@pytest.mark.skipif(
Expand Down