Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[py] Set user_agent and extra_headers via ClientConfig #14718

Merged
merged 8 commits into from
Nov 9, 2024

Conversation

VietND96
Copy link
Member

@VietND96 VietND96 commented Nov 6, 2024

User description

Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.

Description

Continue of #13286

  • extra_headers can be set via ClientConfig
  • user_agent in request headers can be set via ClientConfig
  • Restrict auth_type supports Bearer, X-API-Key. For other advanced methods, suggest using extra_headers instead.
  • Raise warnings when an embedding user:pass in a remote URL because it is insecure.
  • Add more tests for different types of Proxy is set via ClientConfig

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

Enhancement, Tests


Description

  • Enhanced ClientConfig to support setting user_agent and extra_headers, allowing more flexible HTTP request configurations.
  • Updated token authentication to include support for X-API-Key, replacing the previous OAuth option.
  • Added warnings for embedding username and password in URLs, recommending the use of ClientConfig instead.
  • Integrated user_agent and extra_headers into RemoteConnection, ensuring they are used in HTTP requests.
  • Expanded unit tests to cover new features and configurations, ensuring robust validation of changes.

Changes walkthrough 📝

Relevant files
Enhancement
client_config.py
Add user agent and extra headers to ClientConfig                 

py/selenium/webdriver/remote/client_config.py

  • Added user_agent and extra_headers parameters to ClientConfig.
  • Implemented getters and setters for user_agent and extra_headers.
  • Updated token authentication to support X-API-Key.
  • +30/-3   
    remote_connection.py
    Integrate user agent and headers in RemoteConnection         

    py/selenium/webdriver/remote/remote_connection.py

  • Added warnings for insecure username/password in URL.
  • Integrated user_agent and extra_headers from ClientConfig.
  • +5/-0     
    Tests
    remote_connection_tests.py
    Add tests for user agent and extra headers in ClientConfig

    py/test/unit/selenium/webdriver/remote/remote_connection_tests.py

  • Added tests for user_agent and extra_headers in ClientConfig.
  • Added tests for new authentication methods.
  • Enhanced existing tests for connection manager configurations.
  • +82/-9   

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link
    Contributor

    qodo-merge-pro bot commented Nov 6, 2024

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 3 🔵🔵🔵⚪⚪
    🧪 PR contains tests
    🔒 Security concerns

    Sensitive information exposure:
    The PR introduces a warning about embedding username and password in URLs (lines 246-248 in remote_connection.py). While this is a good security practice, it's important to ensure that the alternative method (using ClientConfig) is properly implemented and doesn't introduce new vulnerabilities. Additionally, the new token authentication method for 'X-API-Key' (lines 222-226 in client_config.py) should be carefully reviewed to ensure it's implemented securely and doesn't expose sensitive information.

    ⚡ Recommended focus areas for review

    Security Concern
    The new token authentication method for 'X-API-Key' might need additional security review to ensure it's implemented securely and doesn't introduce vulnerabilities.

    Deprecation Warning
    A new warning has been added for embedding username and password in URLs. This change might affect existing implementations and should be carefully reviewed.

    Test Coverage
    New tests have been added for user_agent and extra_headers in ClientConfig. Ensure these tests cover all possible scenarios and edge cases.

    Copy link
    Contributor

    qodo-merge-pro bot commented Nov 6, 2024

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Security
    Raise a specific exception for insecure credential usage instead of a warning

    Instead of using a simple warning for insecure username/password in URL, consider
    raising a more specific exception, such as InsecureCredentialsError, to prevent
    potential security risks.

    py/selenium/webdriver/remote/remote_connection.py [246-248]

    -warnings.warn(
    -    "Embedding username and password in URL could be insecure, use ClientConfig instead", stacklevel=2
    -)
    +raise InsecureCredentialsError("Embedding username and password in URL is insecure. Use ClientConfig instead.")
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: This change significantly improves security by forcing developers to address the insecure practice of embedding credentials in URLs. It's a critical security enhancement.

    9
    Possible issue
    ✅ Add validation for supported authentication types when setting the token
    Suggestion Impact:The commit introduced an Enum for authentication types and updated the code to use this Enum, which inherently validates the auth_type. This aligns with the suggestion's intention to ensure only supported types are used.

    code diff:

    +class AuthType(Enum):
    +    BASIC = "Basic"
    +    BEARER = "Bearer"
    +    X_API_KEY = "X-API-Key"

    In the token setter method, consider adding a validation check for the auth_type to
    ensure it's one of the supported types (Bearer or X-API-Key) before setting the
    token.

    py/selenium/webdriver/remote/client_config.py [221-227]

     @token.setter
     def token(self, value: str) -> None:
         """Sets the token used for authentication to the remote server if
         auth_type is not basic.
     
         Support values: Bearer, X-API-Key. For others, please use `extra_headers` instead.
         """
    +    if self.auth_type.lower() not in ['bearer', 'x-api-key']:
    +        raise ValueError("Token can only be set for 'Bearer' or 'X-API-Key' auth types.")
         self._token = value
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: This suggestion adds important input validation, preventing incorrect usage and potential security issues. It's a significant improvement in code robustness and security.

    8
    Enhancement
    Enhance test assertions to verify specific values of custom connection manager arguments

    In the test test_connection_manager_with_custom_args_via_client_config, consider
    adding assertions to verify that the retries and timeout objects are correctly set
    with the expected values.

    py/test/unit/selenium/webdriver/remote/remote_connection_tests.py [455-466]

     def test_connection_manager_with_custom_args_via_client_config():
         retries = Retry(connect=2, read=2, redirect=2)
         timeout = Timeout(connect=300, read=3600)
         client_config = ClientConfig(
             remote_server_addr="http://localhost:4444",
             init_args_for_pool_manager={"init_args_for_pool_manager": {"retries": retries, "timeout": timeout}},
         )
         remote_connection = RemoteConnection(client_config=client_config)
         conn = remote_connection._get_connection_manager()
         assert isinstance(conn, urllib3.PoolManager)
         assert conn.connection_pool_kw["retries"] == retries
    +    assert conn.connection_pool_kw["retries"].connect == 2
    +    assert conn.connection_pool_kw["retries"].read == 2
    +    assert conn.connection_pool_kw["retries"].redirect == 2
         assert conn.connection_pool_kw["timeout"] == timeout
    +    assert conn.connection_pool_kw["timeout"].connect == 300
    +    assert conn.connection_pool_kw["timeout"].read == 3600
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion improves test coverage by adding more specific assertions. This enhances the reliability of the tests and helps catch potential regressions, making it a valuable improvement.

    7
    Use a more specific type hint for the extra_headers parameter

    Consider using a more specific type hint for the extra_headers parameter. Instead of
    Optional[dict], use Optional[Dict[str, str]] to clearly indicate that the dictionary
    should contain string keys and values.

    py/selenium/webdriver/remote/client_config.py [44]

    -extra_headers: Optional[dict] = None,
    +extra_headers: Optional[Dict[str, str]] = None,
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    Why: The suggestion improves code clarity by using a more specific type hint, which can help catch potential errors and improve IDE support. However, it's a minor enhancement with moderate impact.

    5

    💡 Need additional feedback ? start a PR chat

    Copy link

    codecov bot commented Nov 6, 2024

    Codecov Report

    Attention: Patch coverage is 60.00000% with 8 lines in your changes missing coverage. Please review.

    Project coverage is 59.22%. Comparing base (57f8398) to head (da57c51).
    Report is 905 commits behind head on trunk.

    Files with missing lines Patch % Lines
    py/selenium/webdriver/remote/client_config.py 68.75% 0 Missing and 5 partials ⚠️
    py/selenium/webdriver/remote/remote_connection.py 25.00% 2 Missing and 1 partial ⚠️
    Additional details and impacted files
    @@            Coverage Diff             @@
    ##            trunk   #14718      +/-   ##
    ==========================================
    + Coverage   58.48%   59.22%   +0.74%     
    ==========================================
      Files          86       91       +5     
      Lines        5270     5874     +604     
      Branches      220      266      +46     
    ==========================================
    + Hits         3082     3479     +397     
    - Misses       1968     2129     +161     
    - Partials      220      266      +46     

    ☔ View full report in Codecov by Sentry.
    📢 Have feedback on the report? Share it here.

    Copy link
    Contributor

    qodo-merge-pro bot commented Nov 6, 2024

    CI Failure Feedback 🧐

    (Checks updated until commit 633b436)

    Action: Python / Browser Tests (safari, macos) / Integration Tests (safari, macos)

    Failed stage: Run Bazel [❌]

    Failed test name: test_should_be_able_to_find_asingle_element_by_id[safari]

    Failure summary:

    The action failed due to multiple test errors related to the Safari WebDriver. The specific issue
    encountered was:

  • The safaridriver service unexpectedly exited with a status code of 1 during the setup phase of
    several tests.
  • This issue affected multiple tests across different test files, indicating a potential problem with
    the Safari WebDriver setup or configuration.

  • Relevant error logs:
    1:  ##[group]Operating System
    2:  macOS
    ...
    
    658:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/driver_element_finding_tests.py/test_attempts/attempt_1.log
    659:  ============================= test session starts ==============================
    660:  �[32mINFO: �[0mFrom Testing //py:test-safari-test/selenium/webdriver/common/driver_element_finding_tests.py:
    661:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    662:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/driver_element_finding_tests.py.runfiles/_main/py
    663:  configfile: pyproject.toml
    664:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    665:  collected 92 items
    666:  py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_should_be_able_to_find_asingle_element_by_id[safari] ERROR [  1%]
    667:  _ ERROR at setup of test_should_be_able_to_find_asingle_element_by_id[safari] __
    ...
    
    674:  # skip tests if not available on the platform
    675:  _platform = platform.system()
    676:  if driver_class == "Safari" and _platform != "Darwin":
    677:  pytest.skip("Safari tests can only run on an Apple OS")
    678:  if (driver_class == "Ie") and _platform != "Windows":
    679:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    680:  if "WebKit" in driver_class and _platform != "Linux":
    681:  pytest.skip("Webkit tests can only run on Linux")
    682:  # conditionally mark tests as expected to fail based on driver
    ...
    
    740:  py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_should_be_able_to_find_multiple_elements_by_id[safari] PASSED [  4%]
    741:  py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_should_be_able_to_find_multiple_elements_by_numeric_id[safari] PASSED [  5%]
    742:  py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_should_not_be_able_to_locate_by_id_asingle_element_that_does_not_exist[safari] PASSED [  6%]
    743:  py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_should_not_be_able_to_locate_by_id_multiple_elements_that_do_not_exist[safari] PASSED [  7%]
    744:  py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_finding_asingle_element_by_empty_id_should_throw[safari] PASSED [  8%]
    745:  py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_finding_multiple_elements_by_empty_id_should_return_empty_list[safari] PASSED [  9%]
    746:  py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_finding_asingle_element_by_id_with_space_should_throw[safari] PASSED [ 10%]
    747:  py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_finding_multiple_elements_by_id_with_space_should_return_empty_list[safari] PASSED [ 11%]
    748:  py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_no_such_element_error[safari] PASSED [ 13%]
    ...
    
    906:  XFAIL py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_should_throw_invalid_selector_exception_when_xpath_returns_wrong_type_in_driver_find_elements[safari] - reason: unlike chrome, safari raises TimeoutException
    907:  XFAIL py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_should_throw_invalid_selector_exception_when_xpath_returns_wrong_type_in_element_find_element[safari] - reason: unlike chrome, safari raises TimeoutException
    908:  XFAIL py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_should_throw_invalid_selector_exception_when_xpath_returns_wrong_type_in_element_find_elements[safari] - reason: unlike chrome, safari raises TimeoutException
    909:  XFAIL py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_finding_asingle_element_by_empty_css_selector_should_throw[safari] - reason: unlike chrome, safari raises TimeoutException
    910:  XFAIL py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_finding_multiple_elements_by_empty_css_selector_should_throw[safari] - reason: unlike chrome, safari raises TimeoutException
    911:  XFAIL py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_finding_asingle_element_by_invalid_css_selector_should_throw[safari] - reason: unlike chrome, safari raises TimeoutException
    912:  XFAIL py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_finding_multiple_elements_by_invalid_css_selector_should_throw[safari] - reason: unlike chrome, safari raises TimeoutException
    913:  XFAIL py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_driver_can_get_link_by_link_test_ignoring_trailing_whitespace[safari] - reason: 
    914:  ERROR py/test/selenium/webdriver/common/driver_element_finding_tests.py::test_should_be_able_to_find_asingle_element_by_id[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    915:  ============= 72 passed, 19 xfailed, 21 warnings, 1 error in 4.24s =============
    ...
    
    929:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/children_finding_tests.py/test_attempts/attempt_1.log
    930:  ============================= test session starts ==============================
    931:  �[32mINFO: �[0mFrom Testing //py:test-safari-test/selenium/webdriver/common/children_finding_tests.py:
    932:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    933:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/children_finding_tests.py.runfiles/_main/py
    934:  configfile: pyproject.toml
    935:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    936:  collected 22 items
    937:  py/test/selenium/webdriver/common/children_finding_tests.py::test_should_find_element_by_xpath[safari] ERROR [  4%]
    938:  _________ ERROR at setup of test_should_find_element_by_xpath[safari] __________
    ...
    
    945:  # skip tests if not available on the platform
    946:  _platform = platform.system()
    947:  if driver_class == "Safari" and _platform != "Darwin":
    948:  pytest.skip("Safari tests can only run on an Apple OS")
    949:  if (driver_class == "Ie") and _platform != "Windows":
    950:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    951:  if "WebKit" in driver_class and _platform != "Linux":
    952:  pytest.skip("Webkit tests can only run on Linux")
    953:  # conditionally mark tests as expected to fail based on driver
    ...
    
    1020:  py/test/selenium/webdriver/common/children_finding_tests.py::test_should_find_element_by_link_text[safari] PASSED [ 59%]
    1021:  py/test/selenium/webdriver/common/children_finding_tests.py::test_should_find_elements_by_link_text[safari] PASSED [ 63%]
    1022:  py/test/selenium/webdriver/common/children_finding_tests.py::test_should_find_element_by_class_name[safari] PASSED [ 68%]
    1023:  py/test/selenium/webdriver/common/children_finding_tests.py::test_should_find_elements_by_class_name[safari] PASSED [ 72%]
    1024:  py/test/selenium/webdriver/common/children_finding_tests.py::test_should_find_element_by_tag_name[safari] PASSED [ 77%]
    1025:  py/test/selenium/webdriver/common/children_finding_tests.py::test_should_find_elements_by_tag_name[safari] PASSED [ 81%]
    1026:  py/test/selenium/webdriver/common/children_finding_tests.py::test_should_be_able_to_find_an_element_by_css_selector[safari] PASSED [ 86%]
    1027:  py/test/selenium/webdriver/common/children_finding_tests.py::test_should_be_able_to_find_multiple_elements_by_css_selector[safari] PASSED [ 90%]
    1028:  py/test/selenium/webdriver/common/children_finding_tests.py::test_should_throw_an_error_if_user_passes_in_invalid_by[safari] PASSED [ 95%]
    1029:  py/test/selenium/webdriver/common/children_finding_tests.py::test_should_throw_an_error_if_user_passes_in_invalid_by_when_find_elements[safari] PASSED [100%]
    ...
    
    1046:  test/selenium/webdriver/common/children_finding_tests.py::test_should_find_element_by_tag_name[safari]
    1047:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/children_finding_tests.py.runfiles/_main/py/test/selenium/webdriver/common/children_finding_tests.py:147: DeprecationWarning: using WebElement.get_attribute() has been deprecated. Please use get_dom_attribute() instead.
    1048:  assert "link1" == element.get_attribute("name")
    1049:  test/selenium/webdriver/common/children_finding_tests.py::test_should_be_able_to_find_an_element_by_css_selector[safari]
    1050:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/children_finding_tests.py.runfiles/_main/py/test/selenium/webdriver/common/children_finding_tests.py:161: DeprecationWarning: using WebElement.get_attribute() has been deprecated. Please use get_dom_attribute() instead.
    1051:  assert "2" == element.get_attribute("id")
    1052:  -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    1053:  =========================== short test summary info ============================
    1054:  ERROR py/test/selenium/webdriver/common/children_finding_tests.py::test_should_find_element_by_xpath[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1055:  =================== 21 passed, 7 warnings, 1 error in 3.83s ====================
    ...
    
    1065:  ============================= test session starts ==============================
    1066:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/click_scrolling_tests.py/test_attempts/attempt_1.log
    1067:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    1068:  �[32mINFO: �[0mFrom Testing //py:test-safari-test/selenium/webdriver/common/click_scrolling_tests.py:
    1069:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/click_scrolling_tests.py.runfiles/_main/py
    1070:  configfile: pyproject.toml
    1071:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    1072:  collected 16 items
    1073:  py/test/selenium/webdriver/common/click_scrolling_tests.py::test_clicking_on_anchor_scrolls_page[safari] ERROR [  6%]
    1074:  ________ ERROR at setup of test_clicking_on_anchor_scrolls_page[safari] ________
    ...
    
    1081:  # skip tests if not available on the platform
    1082:  _platform = platform.system()
    1083:  if driver_class == "Safari" and _platform != "Darwin":
    1084:  pytest.skip("Safari tests can only run on an Apple OS")
    1085:  if (driver_class == "Ie") and _platform != "Windows":
    1086:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    1087:  if "WebKit" in driver_class and _platform != "Linux":
    1088:  pytest.skip("Webkit tests can only run on Linux")
    1089:  # conditionally mark tests as expected to fail based on driver
    ...
    
    1157:  py/test/selenium/webdriver/common/click_scrolling_tests.py::test_should_be_able_to_click_element_that_is_out_of_view_in_anested_frame[safari] PASSED [ 87%]
    1158:  py/test/selenium/webdriver/common/click_scrolling_tests.py::test_should_be_able_to_click_element_that_is_out_of_view_in_anested_frame_that_is_out_of_view[safari] XFAIL [ 93%]
    1159:  py/test/selenium/webdriver/common/click_scrolling_tests.py::test_should_not_scroll_when_getting_element_size[safari] PASSED [100%]
    1160:  =========================== short test summary info ============================
    1161:  XFAIL py/test/selenium/webdriver/common/click_scrolling_tests.py::test_should_scroll_overflow_elements_if_click_point_is_out_of_view_but_element_is_in_view[safari] - reason: 
    1162:  XFAIL py/test/selenium/webdriver/common/click_scrolling_tests.py::test_should_be_able_to_click_element_in_aframe_that_is_out_of_view[safari] - reason: 
    1163:  XFAIL py/test/selenium/webdriver/common/click_scrolling_tests.py::test_should_be_able_to_click_element_that_is_out_of_view_in_aframe_that_is_out_of_view[safari] - reason: 
    1164:  XFAIL py/test/selenium/webdriver/common/click_scrolling_tests.py::test_should_be_able_to_click_element_that_is_out_of_view_in_anested_frame_that_is_out_of_view[safari] - reason: 
    1165:  ERROR py/test/selenium/webdriver/common/click_scrolling_tests.py::test_clicking_on_anchor_scrolls_page[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1166:  ==================== 11 passed, 4 xfailed, 1 error in 3.98s ====================
    ...
    
    1179:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/position_and_size_tests.py/test_attempts/attempt_1.log
    1180:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/position_and_size_tests.py/test_attempts/attempt_2.log
    1181:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    1182:  �[32mINFO: �[0mFrom Testing //py:test-safari-test/selenium/webdriver/common/position_and_size_tests.py:
    1183:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/position_and_size_tests.py.runfiles/_main/py
    1184:  configfile: pyproject.toml
    1185:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    1186:  collected 11 items
    1187:  py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_be_able_to_determine_the_location_of_an_element[safari] ERROR [  9%]
    1188:  _ ERROR at setup of test_should_be_able_to_determine_the_location_of_an_element[safari] _
    ...
    
    1195:  # skip tests if not available on the platform
    1196:  _platform = platform.system()
    1197:  if driver_class == "Safari" and _platform != "Darwin":
    1198:  pytest.skip("Safari tests can only run on an Apple OS")
    1199:  if (driver_class == "Ie") and _platform != "Windows":
    1200:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    1201:  if "WebKit" in driver_class and _platform != "Linux":
    1202:  pytest.skip("Webkit tests can only run on Linux")
    1203:  # conditionally mark tests as expected to fail based on driver
    ...
    
    1271:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_element[safari-empty] - reason: 
    1272:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_element[safari-transparent] - reason: 
    1273:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_element[safari-hidden] - reason: 
    1274:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_invisible_element[safari] - reason: 
    1275:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_scroll_page_and_get_coordinates_of_an_element_that_is_out_of_view_port[safari] - reason: 
    1276:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_element_in_aframe[safari] - reason: 
    1277:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_element_in_anested_frame[safari] - reason: 
    1278:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_element_with_fixed_position[safari] - reason: 
    1279:  ERROR py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_be_able_to_determine_the_location_of_an_element[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1280:  ==================== 1 passed, 9 xfailed, 1 error in 7.38s =====================
    1281:  ================================================================================
    1282:  ==================== Test output for //py:test-safari-test/selenium/webdriver/common/position_and_size_tests.py:
    1283:  ============================= test session starts ==============================
    1284:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    1285:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/position_and_size_tests.py.runfiles/_main/py
    1286:  configfile: pyproject.toml
    1287:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    1288:  collected 11 items
    1289:  py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_be_able_to_determine_the_location_of_an_element[safari] ERROR [  9%]
    1290:  _ ERROR at setup of test_should_be_able_to_determine_the_location_of_an_element[safari] _
    ...
    
    1297:  # skip tests if not available on the platform
    1298:  _platform = platform.system()
    1299:  if driver_class == "Safari" and _platform != "Darwin":
    1300:  pytest.skip("Safari tests can only run on an Apple OS")
    1301:  if (driver_class == "Ie") and _platform != "Windows":
    1302:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    1303:  if "WebKit" in driver_class and _platform != "Linux":
    1304:  pytest.skip("Webkit tests can only run on Linux")
    1305:  # conditionally mark tests as expected to fail based on driver
    ...
    
    1373:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_element[safari-empty] - reason: 
    1374:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_element[safari-transparent] - reason: 
    1375:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_element[safari-hidden] - reason: 
    1376:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_invisible_element[safari] - reason: 
    1377:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_scroll_page_and_get_coordinates_of_an_element_that_is_out_of_view_port[safari] - reason: 
    1378:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_element_in_aframe[safari] - reason: 
    1379:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_element_in_anested_frame[safari] - reason: 
    1380:  XFAIL py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_get_coordinates_of_an_element_with_fixed_position[safari] - reason: 
    1381:  ERROR py/test/selenium/webdriver/common/position_and_size_tests.py::test_should_be_able_to_determine_the_location_of_an_element[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1382:  ==================== 1 passed, 9 xfailed, 1 error in 6.88s =====================
    ...
    
    1391:  ============================= test session starts ==============================
    1392:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/page_load_timeout_tests.py/test_attempts/attempt_1.log
    1393:  �[32mINFO: �[0mFrom Testing //py:test-safari-test/selenium/webdriver/common/page_load_timeout_tests.py:
    1394:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    1395:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/page_load_timeout_tests.py.runfiles/_main/py
    1396:  configfile: pyproject.toml
    1397:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    1398:  collected 2 items
    1399:  py/test/selenium/webdriver/common/page_load_timeout_tests.py::test_should_timeout_on_page_load_taking_too_long[safari] ERROR [ 50%]
    1400:  __ ERROR at setup of test_should_timeout_on_page_load_taking_too_long[safari] __
    ...
    
    1407:  # skip tests if not available on the platform
    1408:  _platform = platform.system()
    1409:  if driver_class == "Safari" and _platform != "Darwin":
    1410:  pytest.skip("Safari tests can only run on an Apple OS")
    1411:  if (driver_class == "Ie") and _platform != "Windows":
    1412:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    1413:  if "WebKit" in driver_class and _platform != "Linux":
    1414:  pytest.skip("Webkit tests can only run on Linux")
    1415:  # conditionally mark tests as expected to fail based on driver
    ...
    
    1466:  return_code = self.process.poll()
    1467:  if return_code:
    1468:  >           raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
    1469:  E           selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1470:  py/selenium/webdriver/common/service.py:121: WebDriverException
    1471:  py/test/selenium/webdriver/common/page_load_timeout_tests.py::test_click_should_timeout[safari] XFAIL [100%]
    1472:  =========================== short test summary info ============================
    1473:  XFAIL py/test/selenium/webdriver/common/page_load_timeout_tests.py::test_click_should_timeout[safari] - reason: 
    1474:  ERROR py/test/selenium/webdriver/common/page_load_timeout_tests.py::test_should_timeout_on_page_load_taking_too_long[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1475:  ========================= 1 xfailed, 1 error in 0.98s ==========================
    ...
    
    1488:  ============================= test session starts ==============================
    1489:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/click_tests.py/test_attempts/attempt_2.log
    1490:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    1491:  �[32mINFO: �[0mFrom Testing //py:test-safari-test/selenium/webdriver/common/click_tests.py:
    1492:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/click_tests.py.runfiles/_main/py
    1493:  configfile: pyproject.toml
    1494:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    1495:  collected 2 items
    1496:  py/test/selenium/webdriver/common/click_tests.py::test_can_click_on_alink_that_overflows_and_follow_it[safari] ERROR [ 50%]
    1497:  _ ERROR at setup of test_can_click_on_alink_that_overflows_and_follow_it[safari] _
    ...
    
    1504:  # skip tests if not available on the platform
    1505:  _platform = platform.system()
    1506:  if driver_class == "Safari" and _platform != "Darwin":
    1507:  pytest.skip("Safari tests can only run on an Apple OS")
    1508:  if (driver_class == "Ie") and _platform != "Windows":
    1509:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    1510:  if "WebKit" in driver_class and _platform != "Linux":
    1511:  pytest.skip("Webkit tests can only run on Linux")
    1512:  # conditionally mark tests as expected to fail based on driver
    ...
    
    1562:  """Check if the underlying process is still running."""
    1563:  return_code = self.process.poll()
    1564:  if return_code:
    1565:  >           raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
    1566:  E           selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1567:  py/selenium/webdriver/common/service.py:121: WebDriverException
    1568:  py/test/selenium/webdriver/common/click_tests.py::test_clicking_alink_made_up_of_numbers_is_handled_correctly[safari] PASSED [100%]
    1569:  =========================== short test summary info ============================
    1570:  ERROR py/test/selenium/webdriver/common/click_tests.py::test_can_click_on_alink_that_overflows_and_follow_it[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1571:  ========================== 1 passed, 1 error in 9.96s ==========================
    1572:  ================================================================================
    1573:  ==================== Test output for //py:test-safari-test/selenium/webdriver/common/click_tests.py:
    1574:  ============================= test session starts ==============================
    1575:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    1576:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/click_tests.py.runfiles/_main/py
    1577:  configfile: pyproject.toml
    1578:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    1579:  collected 2 items
    1580:  py/test/selenium/webdriver/common/click_tests.py::test_can_click_on_alink_that_overflows_and_follow_it[safari] ERROR [ 50%]
    1581:  _ ERROR at setup of test_can_click_on_alink_that_overflows_and_follow_it[safari] _
    ...
    
    1588:  # skip tests if not available on the platform
    1589:  _platform = platform.system()
    1590:  if driver_class == "Safari" and _platform != "Darwin":
    1591:  pytest.skip("Safari tests can only run on an Apple OS")
    1592:  if (driver_class == "Ie") and _platform != "Windows":
    1593:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    1594:  if "WebKit" in driver_class and _platform != "Linux":
    1595:  pytest.skip("Webkit tests can only run on Linux")
    1596:  # conditionally mark tests as expected to fail based on driver
    ...
    
    1646:  """Check if the underlying process is still running."""
    1647:  return_code = self.process.poll()
    1648:  if return_code:
    1649:  >           raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
    1650:  E           selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1651:  py/selenium/webdriver/common/service.py:121: WebDriverException
    1652:  py/test/selenium/webdriver/common/click_tests.py::test_clicking_alink_made_up_of_numbers_is_handled_correctly[safari] PASSED [100%]
    1653:  =========================== short test summary info ============================
    1654:  ERROR py/test/selenium/webdriver/common/click_tests.py::test_can_click_on_alink_that_overflows_and_follow_it[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1655:  ========================== 1 passed, 1 error in 7.12s ==========================
    ...
    
    1668:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/support/event_firing_webdriver_tests.py/test_attempts/attempt_2.log
    1669:  �[32mINFO: �[0mFrom Testing //py:test-safari-test/selenium/webdriver/support/event_firing_webdriver_tests.py:
    1670:  ============================= test session starts ==============================
    1671:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    1672:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/support/event_firing_webdriver_tests.py.runfiles/_main/py
    1673:  configfile: pyproject.toml
    1674:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    1675:  collected 12 items
    1676:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_fire_navigation_events[safari] ERROR [  8%]
    1677:  _________ ERROR at setup of test_should_fire_navigation_events[safari] _________
    ...
    
    1684:  # skip tests if not available on the platform
    1685:  _platform = platform.system()
    1686:  if driver_class == "Safari" and _platform != "Darwin":
    1687:  pytest.skip("Safari tests can only run on an Apple OS")
    1688:  if (driver_class == "Ie") and _platform != "Windows":
    1689:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    1690:  if "WebKit" in driver_class and _platform != "Linux":
    1691:  pytest.skip("Webkit tests can only run on Linux")
    1692:  # conditionally mark tests as expected to fail based on driver
    ...
    
    1748:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_fire_click_event[safari] XFAIL [ 16%]
    1749:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_fire_change_value_event[safari] PASSED [ 25%]
    1750:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_fire_find_event[safari] PASSED [ 33%]
    1751:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_call_listener_when_an_exception_is_thrown[safari] PASSED [ 41%]
    1752:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_unwrap_element_args_when_calling_scripts[safari] PASSED [ 50%]
    1753:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_unwrap_element_args_when_switching_frames[safari] PASSED [ 58%]
    1754:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_be_able_to_access_wrapped_instance_from_event_calls[safari] PASSED [ 66%]
    1755:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_using_kwargs[safari] PASSED [ 75%]
    1756:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_missing_attributes_raise_error[safari] PASSED [ 83%]
    ...
    
    1764:  test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_using_kwargs[safari]
    1765:  test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_can_use_pointer_input_with_event_firing_webdriver[safari]
    1766:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/support/event_firing_webdriver_tests.py.runfiles/_main/py/selenium/webdriver/support/event_firing_webdriver.py:216: DeprecationWarning: using WebElement.get_attribute() has been deprecated. Please use get_dom_attribute() instead.
    1767:  result = attrib(*args, **kwargs)
    1768:  -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    1769:  =========================== short test summary info ============================
    1770:  XFAIL py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_fire_click_event[safari] - reason: 
    1771:  XFAIL py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_can_use_key_input_with_event_firing_webdriver[safari] - reason: 
    1772:  ERROR py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_fire_navigation_events[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1773:  ============== 9 passed, 2 xfailed, 6 warnings, 1 error in 10.07s ==============
    1774:  ================================================================================
    1775:  ==================== Test output for //py:test-safari-test/selenium/webdriver/support/event_firing_webdriver_tests.py:
    1776:  ============================= test session starts ==============================
    1777:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    1778:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/support/event_firing_webdriver_tests.py.runfiles/_main/py
    1779:  configfile: pyproject.toml
    1780:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    1781:  collected 12 items
    1782:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_fire_navigation_events[safari] ERROR [  8%]
    1783:  _________ ERROR at setup of test_should_fire_navigation_events[safari] _________
    ...
    
    1790:  # skip tests if not available on the platform
    1791:  _platform = platform.system()
    1792:  if driver_class == "Safari" and _platform != "Darwin":
    1793:  pytest.skip("Safari tests can only run on an Apple OS")
    1794:  if (driver_class == "Ie") and _platform != "Windows":
    1795:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    1796:  if "WebKit" in driver_class and _platform != "Linux":
    1797:  pytest.skip("Webkit tests can only run on Linux")
    1798:  # conditionally mark tests as expected to fail based on driver
    ...
    
    1854:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_fire_click_event[safari] XFAIL [ 16%]
    1855:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_fire_change_value_event[safari] PASSED [ 25%]
    1856:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_fire_find_event[safari] PASSED [ 33%]
    1857:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_call_listener_when_an_exception_is_thrown[safari] PASSED [ 41%]
    1858:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_unwrap_element_args_when_calling_scripts[safari] PASSED [ 50%]
    1859:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_unwrap_element_args_when_switching_frames[safari] PASSED [ 58%]
    1860:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_be_able_to_access_wrapped_instance_from_event_calls[safari] PASSED [ 66%]
    1861:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_using_kwargs[safari] PASSED [ 75%]
    1862:  py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_missing_attributes_raise_error[safari] PASSED [ 83%]
    ...
    
    1870:  test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_using_kwargs[safari]
    1871:  test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_can_use_pointer_input_with_event_firing_webdriver[safari]
    1872:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/support/event_firing_webdriver_tests.py.runfiles/_main/py/selenium/webdriver/support/event_firing_webdriver.py:216: DeprecationWarning: using WebElement.get_attribute() has been deprecated. Please use get_dom_attribute() instead.
    1873:  result = attrib(*args, **kwargs)
    1874:  -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    1875:  =========================== short test summary info ============================
    1876:  XFAIL py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_fire_click_event[safari] - reason: 
    1877:  XFAIL py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_can_use_key_input_with_event_firing_webdriver[safari] - reason: 
    1878:  ERROR py/test/selenium/webdriver/support/event_firing_webdriver_tests.py::test_should_fire_navigation_events[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1879:  ============== 9 passed, 2 xfailed, 6 warnings, 1 error in 8.54s ===============
    ...
    
    1892:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/rendered_webelement_tests.py/test_attempts/attempt_1.log
    1893:  ============================= test session starts ==============================
    1894:  �[32mINFO: �[0mFrom Testing //py:test-safari-test/selenium/webdriver/common/rendered_webelement_tests.py:
    1895:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    1896:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/rendered_webelement_tests.py.runfiles/_main/py
    1897:  configfile: pyproject.toml
    1898:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    1899:  collected 4 items
    1900:  py/test/selenium/webdriver/common/rendered_webelement_tests.py::test_should_pick_up_style_of_an_element[safari] ERROR [ 25%]
    1901:  ______ ERROR at setup of test_should_pick_up_style_of_an_element[safari] _______
    ...
    
    1908:  # skip tests if not available on the platform
    1909:  _platform = platform.system()
    1910:  if driver_class == "Safari" and _platform != "Darwin":
    1911:  pytest.skip("Safari tests can only run on an Apple OS")
    1912:  if (driver_class == "Ie") and _platform != "Windows":
    1913:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    1914:  if "WebKit" in driver_class and _platform != "Linux":
    1915:  pytest.skip("Webkit tests can only run on Linux")
    1916:  # conditionally mark tests as expected to fail based on driver
    ...
    
    1969:  >           raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
    1970:  E           selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1971:  py/selenium/webdriver/common/service.py:121: WebDriverException
    1972:  py/test/selenium/webdriver/common/rendered_webelement_tests.py::test_should_allow_inherited_styles_to_be_used[safari] PASSED [ 50%]
    1973:  py/test/selenium/webdriver/common/rendered_webelement_tests.py::test_should_correctly_identify_that_an_element_has_width[safari] PASSED [ 75%]
    1974:  py/test/selenium/webdriver/common/rendered_webelement_tests.py::test_should_be_able_to_determine_the_rect_of_an_element[safari] XFAIL [100%]
    1975:  =========================== short test summary info ============================
    1976:  XFAIL py/test/selenium/webdriver/common/rendered_webelement_tests.py::test_should_be_able_to_determine_the_rect_of_an_element[safari] - reason: Get Element Rect command not implemented
    1977:  ERROR py/test/selenium/webdriver/common/rendered_webelement_tests.py::test_should_pick_up_style_of_an_element[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    1978:  ==================== 2 passed, 1 xfailed, 1 error in 4.11s =====================
    ...
    
    1987:  ============================= test session starts ==============================
    1988:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/script_pinning_tests.py/test_attempts/attempt_1.log
    1989:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    1990:  �[32mINFO: �[0mFrom Testing //py:test-safari-test/selenium/webdriver/common/script_pinning_tests.py:
    1991:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/script_pinning_tests.py.runfiles/_main/py
    1992:  configfile: pyproject.toml
    1993:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    1994:  collected 6 items
    1995:  py/test/selenium/webdriver/common/script_pinning_tests.py::test_should_allow_script_pinning[safari] ERROR [ 16%]
    1996:  __________ ERROR at setup of test_should_allow_script_pinning[safari] __________
    ...
    
    2003:  # skip tests if not available on the platform
    2004:  _platform = platform.system()
    2005:  if driver_class == "Safari" and _platform != "Darwin":
    2006:  pytest.skip("Safari tests can only run on an Apple OS")
    2007:  if (driver_class == "Ie") and _platform != "Windows":
    2008:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    2009:  if "WebKit" in driver_class and _platform != "Linux":
    2010:  pytest.skip("Webkit tests can only run on Linux")
    2011:  # conditionally mark tests as expected to fail based on driver
    ...
    
    2062:  return_code = self.process.poll()
    2063:  if return_code:
    2064:  >           raise WebDriverException(f"Service {self._path} unexpectedly exited. Status code was: {return_code}")
    2065:  E           selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    2066:  py/selenium/webdriver/common/service.py:121: WebDriverException
    2067:  py/test/selenium/webdriver/common/script_pinning_tests.py::test_should_allow_pinned_scripts_to_take_arguments[safari] PASSED [ 33%]
    2068:  py/test/selenium/webdriver/common/script_pinning_tests.py::test_should_list_all_pinned_scripts[safari] PASSED [ 50%]
    2069:  py/test/selenium/webdriver/common/script_pinning_tests.py::test_should_allow_scripts_to_be_unpinned[safari] PASSED [ 66%]
    2070:  py/test/selenium/webdriver/common/script_pinning_tests.py::test_calling_unpinned_script_causes_error[safari] PASSED [ 83%]
    2071:  py/test/selenium/webdriver/common/script_pinning_tests.py::test_unpinning_non_existing_script_raises[safari] PASSED [100%]
    2072:  =========================== short test summary info ============================
    2073:  ERROR py/test/selenium/webdriver/common/script_pinning_tests.py::test_should_allow_script_pinning[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    2074:  ========================== 5 passed, 1 error in 8.00s ==========================
    ...
    
    2088:  �[32mINFO: �[0mFrom Testing //py:test-safari-test/selenium/webdriver/common/window_tests.py:
    2089:  ==================== Test output for //py:test-safari-test/selenium/webdriver/common/window_tests.py:
    2090:  ============================= test session starts ==============================
    2091:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    2092:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/window_tests.py.runfiles/_main/py
    2093:  configfile: pyproject.toml
    2094:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    2095:  collected 8 items
    2096:  py/test/selenium/webdriver/common/window_tests.py::test_should_get_the_size_of_the_current_window[safari] ERROR [ 12%]
    2097:  ___ ERROR at setup of test_should_get_the_size_of_the_current_window[safari] ___
    ...
    
    2104:  # skip tests if not available on the platform
    2105:  _platform = platform.system()
    2106:  if driver_class == "Safari" and _platform != "Darwin":
    2107:  pytest.skip("Safari tests can only run on an Apple OS")
    2108:  if (driver_class == "Ie") and _platform != "Windows":
    2109:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    2110:  if "WebKit" in driver_class and _platform != "Linux":
    2111:  pytest.skip("Webkit tests can only run on Linux")
    2112:  # conditionally mark tests as expected to fail based on driver
    ...
    
    2170:  py/test/selenium/webdriver/common/window_tests.py::test_should_set_the_position_of_the_current_window[safari] PASSED [ 50%]
    2171:  py/test/selenium/webdriver/common/window_tests.py::test_should_get_the_rect_of_the_current_window[safari] XFAIL [ 62%]
    2172:  py/test/selenium/webdriver/common/window_tests.py::test_should_set_the_rect_of_the_current_window[safari] XFAIL [ 75%]
    2173:  py/test/selenium/webdriver/common/window_tests.py::test_set_window_rect_should_accept_0_as_x_and_y[safari] PASSED [ 87%]
    2174:  py/test/selenium/webdriver/common/window_tests.py::test_set_window_rect_throws_when_height_and_width_are_0[safari] PASSED [100%]
    2175:  =========================== short test summary info ============================
    2176:  XFAIL py/test/selenium/webdriver/common/window_tests.py::test_should_get_the_rect_of_the_current_window[safari] - reason: Get Window Rect command not implemented
    2177:  XFAIL py/test/selenium/webdriver/common/window_tests.py::test_should_set_the_rect_of_the_current_window[safari] - reason: Get Window Rect command not implemented
    2178:  ERROR py/test/selenium/webdriver/common/window_tests.py::test_should_get_the_size_of_the_current_window[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    2179:  ==================== 5 passed, 2 xfailed, 1 error in 3.71s =====================
    2180:  ================================================================================
    2181:  ==================== Test output for //py:test-safari-test/selenium/webdriver/common/window_tests.py:
    2182:  ============================= test session starts ==============================
    2183:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    2184:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/window_tests.py.runfiles/_main/py
    2185:  configfile: pyproject.toml
    2186:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    2187:  collected 8 items
    2188:  py/test/selenium/webdriver/common/window_tests.py::test_should_get_the_size_of_the_current_window[safari] ERROR [ 12%]
    2189:  ___ ERROR at setup of test_should_get_the_size_of_the_current_window[safari] ___
    ...
    
    2196:  # skip tests if not available on the platform
    2197:  _platform = platform.system()
    2198:  if driver_class == "Safari" and _platform != "Darwin":
    2199:  pytest.skip("Safari tests can only run on an Apple OS")
    2200:  if (driver_class == "Ie") and _platform != "Windows":
    2201:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    2202:  if "WebKit" in driver_class and _platform != "Linux":
    2203:  pytest.skip("Webkit tests can only run on Linux")
    2204:  # conditionally mark tests as expected to fail based on driver
    ...
    
    2262:  py/test/selenium/webdriver/common/window_tests.py::test_should_set_the_position_of_the_current_window[safari] PASSED [ 50%]
    2263:  py/test/selenium/webdriver/common/window_tests.py::test_should_get_the_rect_of_the_current_window[safari] XFAIL [ 62%]
    2264:  py/test/selenium/webdriver/common/window_tests.py::test_should_set_the_rect_of_the_current_window[safari] XFAIL [ 75%]
    2265:  py/test/selenium/webdriver/common/window_tests.py::test_set_window_rect_should_accept_0_as_x_and_y[safari] PASSED [ 87%]
    2266:  py/test/selenium/webdriver/common/window_tests.py::test_set_window_rect_throws_when_height_and_width_are_0[safari] PASSED [100%]
    2267:  =========================== short test summary info ============================
    2268:  XFAIL py/test/selenium/webdriver/common/window_tests.py::test_should_get_the_rect_of_the_current_window[safari] - reason: Get Window Rect command not implemented
    2269:  XFAIL py/test/selenium/webdriver/common/window_tests.py::test_should_set_the_rect_of_the_current_window[safari] - reason: Get Window Rect command not implemented
    2270:  ERROR py/test/selenium/webdriver/common/window_tests.py::test_should_get_the_size_of_the_current_window[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    2271:  ==================== 5 passed, 2 xfailed, 1 error in 7.64s =====================
    ...
    
    2293:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_fire_mouse_down_event_when_clicking[safari] XFAIL [ 15%]
    2294:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_fire_mouse_up_event_when_clicking[safari] XFAIL [ 23%]
    2295:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_issue_mouse_down_events[safari] XFAIL [ 30%]
    2296:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_issue_click_events[safari] XFAIL [ 38%]
    2297:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_issue_mouse_up_events[safari] XFAIL [ 46%]
    2298:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_mouse_events_should_bubble_up_to_containing_elements[safari] XFAIL [ 53%]
    2299:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_emit_on_change_events_when_selecting_elements[safari] XFAIL [ 61%]
    2300:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_emit_on_change_events_when_changing_the_state_of_acheckbox[safari] XFAIL [ 69%]
    2301:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_emit_click_event_when_clicking_on_atext_input_element[safari] ERROR [ 76%]
    2302:  _ ERROR at setup of test_should_emit_click_event_when_clicking_on_atext_input_element[safari] _
    ...
    
    2309:  # skip tests if not available on the platform
    2310:  _platform = platform.system()
    2311:  if driver_class == "Safari" and _platform != "Darwin":
    2312:  pytest.skip("Safari tests can only run on an Apple OS")
    2313:  if (driver_class == "Ie") and _platform != "Windows":
    2314:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    2315:  if "WebKit" in driver_class and _platform != "Linux":
    2316:  pytest.skip("Webkit tests can only run on Linux")
    2317:  # conditionally mark tests as expected to fail based on driver
    ...
    
    2379:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_fire_mouse_up_event_when_clicking[safari] - reason: 
    2380:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_issue_mouse_down_events[safari] - reason: 
    2381:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_issue_click_events[safari] - reason: 
    2382:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_issue_mouse_up_events[safari] - reason: 
    2383:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_mouse_events_should_bubble_up_to_containing_elements[safari] - reason: 
    2384:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_emit_on_change_events_when_selecting_elements[safari] - reason: 
    2385:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_emit_on_change_events_when_changing_the_state_of_acheckbox[safari] - reason: 
    2386:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_clearing_an_element_should_cause_the_on_change_handler_to_fire[safari] - reason: 
    2387:  ERROR py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_emit_click_event_when_clicking_on_atext_input_element[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    2388:  =================== 2 passed, 10 xfailed, 1 error in 14.58s ====================
    ...
    
    2398:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_fire_mouse_down_event_when_clicking[safari] XFAIL [ 15%]
    2399:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_fire_mouse_up_event_when_clicking[safari] XFAIL [ 23%]
    2400:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_issue_mouse_down_events[safari] XFAIL [ 30%]
    2401:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_issue_click_events[safari] XFAIL [ 38%]
    2402:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_issue_mouse_up_events[safari] XFAIL [ 46%]
    2403:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_mouse_events_should_bubble_up_to_containing_elements[safari] XFAIL [ 53%]
    2404:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_emit_on_change_events_when_selecting_elements[safari] XFAIL [ 61%]
    2405:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_emit_on_change_events_when_changing_the_state_of_acheckbox[safari] XFAIL [ 69%]
    2406:  py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_emit_click_event_when_clicking_on_atext_input_element[safari] ERROR [ 76%]
    2407:  _ ERROR at setup of test_should_emit_click_event_when_clicking_on_atext_input_element[safari] _
    ...
    
    2414:  # skip tests if not available on the platform
    2415:  _platform = platform.system()
    2416:  if driver_class == "Safari" and _platform != "Darwin":
    2417:  pytest.skip("Safari tests can only run on an Apple OS")
    2418:  if (driver_class == "Ie") and _platform != "Windows":
    2419:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    2420:  if "WebKit" in driver_class and _platform != "Linux":
    2421:  pytest.skip("Webkit tests can only run on Linux")
    2422:  # conditionally mark tests as expected to fail based on driver
    ...
    
    2484:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_fire_mouse_up_event_when_clicking[safari] - reason: 
    2485:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_issue_mouse_down_events[safari] - reason: 
    2486:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_issue_click_events[safari] - reason: 
    2487:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_issue_mouse_up_events[safari] - reason: 
    2488:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_mouse_events_should_bubble_up_to_containing_elements[safari] - reason: 
    2489:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_emit_on_change_events_when_selecting_elements[safari] - reason: 
    2490:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_emit_on_change_events_when_changing_the_state_of_acheckbox[safari] - reason: 
    2491:  XFAIL py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_clearing_an_element_should_cause_the_on_change_handler_to_fire[safari] - reason: 
    2492:  ERROR py/test/selenium/webdriver/common/correct_event_firing_tests.py::test_should_emit_click_event_when_clicking_on_atext_input_element[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    2493:  ==================== 2 passed, 10 xfailed, 1 error in 3.68s ====================
    ...
    
    2497:  �[31m�[1mFAIL: �[0m//py:test-safari-test/selenium/webdriver/common/visibility_tests.py (see /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/visibility_tests.py/test_attempts/attempt_1.log)
    2498:  �[32m[2,047 / 2,048]�[0m 28 / 55 tests;�[0m Testing //py:test-safari-test/selenium/webdriver/common/visibility_tests.py; 9s local, disk-cache
    2499:  �[32m[2,047 / 2,048]�[0m 28 / 55 tests;�[0m Testing //py:test-safari-test/selenium/webdriver/common/visibility_tests.py; 20s local, disk-cache
    2500:  �[31m�[1mFAIL: �[0m//py:test-safari-test/selenium/webdriver/common/visibility_tests.py (see /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/visibility_tests.py/test_attempts/attempt_2.log)
    2501:  �[32m[2,047 / 2,048]�[0m 28 / 55 tests;�[0m Testing //py:test-safari-test/selenium/webdriver/common/visibility_tests.py; 22s local, disk-cache
    2502:  �[32m[2,047 / 2,048]�[0m 28 / 55 tests;�[0m Testing //py:test-safari-test/selenium/webdriver/common/visibility_tests.py; 30s local, disk-cache
    2503:  �[31m�[1mFAIL: �[0m//py:test-safari-test/selenium/webdriver/common/visibility_tests.py (see /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/visibility_tests.py/test.log)
    2504:  ==================== Test output for //py:test-safari-test/selenium/webdriver/common/visibility_tests.py:
    2505:  �[31m�[1mFAILED: �[0m//py:test-safari-test/selenium/webdriver/common/visibility_tests.py (Summary)
    2506:  ============================= test session starts ==============================
    2507:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/visibility_tests.py/test.log
    2508:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    2509:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/visibility_tests.py.runfiles/_main/py
    2510:  configfile: pyproject.toml
    2511:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    2512:  collected 15 items
    2513:  py/test/selenium/webdriver/common/visibility_tests.py::test_should_allow_the_user_to_tell_if_an_element_is_displayed_or_not[safari] ERROR [  6%]
    2514:  _ ERROR at setup of test_should_allow_the_user_to_tell_if_an_element_is_displayed_or_not[safari] _
    ...
    
    2521:  # skip tests if not available on the platform
    2522:  _platform = platform.system()
    2523:  if driver_class == "Safari" and _platform != "Darwin":
    2524:  pytest.skip("Safari tests can only run on an Apple OS")
    2525:  if (driver_class == "Ie") and _platform != "Windows":
    2526:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    2527:  if "WebKit" in driver_class and _platform != "Linux":
    2528:  pytest.skip("Webkit tests can only run on Linux")
    2529:  # conditionally mark tests as expected to fail based on driver
    ...
    
    2598:  py/test/selenium/webdriver/common/visibility_tests.py::test_should_show_element_not_visible_when_parent_element_has_hidden_attribute[safari] PASSED [100%]
    2599:  =============================== warnings summary ===============================
    2600:  test/selenium/webdriver/common/visibility_tests.py::test_should_not_be_able_to_type_an_element_that_is_not_displayed[safari]
    2601:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/visibility_tests.py.runfiles/_main/py/test/selenium/webdriver/common/visibility_tests.py:106: DeprecationWarning: using WebElement.get_attribute() has been deprecated. Please use get_dom_attribute() instead.
    2602:  assert element.get_attribute("value") != "You don't see me"
    2603:  -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    2604:  =========================== short test summary info ============================
    2605:  XFAIL py/test/selenium/webdriver/common/visibility_tests.py::test_should_modify_the_visibility_of_an_element_dynamically[safari] - reason: 
    2606:  ERROR py/test/selenium/webdriver/common/visibility_tests.py::test_should_allow_the_user_to_tell_if_an_element_is_displayed_or_not[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    2607:  ============== 13 passed, 1 xfailed, 1 warning, 1 error in 6.93s ===============
    2608:  ================================================================================
    2609:  ==================== Test output for //py:test-safari-test/selenium/webdriver/common/visibility_tests.py:
    2610:  ============================= test session starts ==============================
    2611:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    2612:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/visibility_tests.py.runfiles/_main/py
    2613:  configfile: pyproject.toml
    2614:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    2615:  collected 15 items
    2616:  py/test/selenium/webdriver/common/visibility_tests.py::test_should_allow_the_user_to_tell_if_an_element_is_displayed_or_not[safari] ERROR [  6%]
    2617:  _ ERROR at setup of test_should_allow_the_user_to_tell_if_an_element_is_displayed_or_not[safari] _
    ...
    
    2624:  # skip tests if not available on the platform
    2625:  _platform = platform.system()
    2626:  if driver_class == "Safari" and _platform != "Darwin":
    2627:  pytest.skip("Safari tests can only run on an Apple OS")
    2628:  if (driver_class == "Ie") and _platform != "Windows":
    2629:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    2630:  if "WebKit" in driver_class and _platform != "Linux":
    2631:  pytest.skip("Webkit tests can only run on Linux")
    2632:  # conditionally mark tests as expected to fail based on driver
    ...
    
    2701:  py/test/selenium/webdriver/common/visibility_tests.py::test_should_show_element_not_visible_when_parent_element_has_hidden_attribute[safari] PASSED [100%]
    2702:  =============================== warnings summary ===============================
    2703:  test/selenium/webdriver/common/visibility_tests.py::test_should_not_be_able_to_type_an_element_that_is_not_displayed[safari]
    2704:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/visibility_tests.py.runfiles/_main/py/test/selenium/webdriver/common/visibility_tests.py:106: DeprecationWarning: using WebElement.get_attribute() has been deprecated. Please use get_dom_attribute() instead.
    2705:  assert element.get_attribute("value") != "You don't see me"
    2706:  -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    2707:  =========================== short test summary info ============================
    2708:  XFAIL py/test/selenium/webdriver/common/visibility_tests.py::test_should_modify_the_visibility_of_an_element_dynamically[safari] - reason: 
    2709:  ERROR py/test/selenium/webdriver/common/visibility_tests.py::test_should_allow_the_user_to_tell_if_an_element_is_displayed_or_not[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    2710:  ============== 13 passed, 1 xfailed, 1 warning, 1 error in 9.30s ===============
    2711:  ================================================================================
    2712:  ==================== Test output for //py:test-safari-test/selenium/webdriver/common/visibility_tests.py:
    2713:  ============================= test session starts ==============================
    2714:  platform darwin -- Python 3.8.19, pytest-7.4.4, pluggy-1.3.0
    2715:  rootdir: /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/visibility_tests.py.runfiles/_main/py
    2716:  configfile: pyproject.toml
    2717:  plugins: instafail-0.5.0, trio-0.8.0, mock-3.12.0
    2718:  collected 15 items
    2719:  py/test/selenium/webdriver/common/visibility_tests.py::test_should_allow_the_user_to_tell_if_an_element_is_displayed_or_not[safari] ERROR [  6%]
    2720:  _ ERROR at setup of test_should_allow_the_user_to_tell_if_an_element_is_displayed_or_not[safari] _
    ...
    
    2727:  # skip tests if not available on the platform
    2728:  _platform = platform.system()
    2729:  if driver_class == "Safari" and _platform != "Darwin":
    2730:  pytest.skip("Safari tests can only run on an Apple OS")
    2731:  if (driver_class == "Ie") and _platform != "Windows":
    2732:  pytest.skip("IE and EdgeHTML Tests can only run on Windows")
    2733:  if "WebKit" in driver_class and _platform != "Linux":
    2734:  pytest.skip("Webkit tests can only run on Linux")
    2735:  # conditionally mark tests as expected to fail based on driver
    ...
    
    2804:  py/test/selenium/webdriver/common/visibility_tests.py::test_should_show_element_not_visible_when_parent_element_has_hidden_attribute[safari] PASSED [100%]
    2805:  =============================== warnings summary ===============================
    2806:  test/selenium/webdriver/common/visibility_tests.py::test_should_not_be_able_to_type_an_element_that_is_not_displayed[safari]
    2807:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/bin/py/test-safari-test/selenium/webdriver/common/visibility_tests.py.runfiles/_main/py/test/selenium/webdriver/common/visibility_tests.py:106: DeprecationWarning: using WebElement.get_attribute() has been deprecated. Please use get_dom_attribute() instead.
    2808:  assert element.get_attribute("value") != "You don't see me"
    2809:  -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    2810:  =========================== short test summary info ============================
    2811:  XFAIL py/test/selenium/webdriver/common/visibility_tests.py::test_should_modify_the_visibility_of_an_element_dynamically[safari] - reason: 
    2812:  ERROR py/test/selenium/webdriver/common/visibility_tests.py::test_should_allow_the_user_to_tell_if_an_element_is_displayed_or_not[safari] - selenium.common.exceptions.WebDriverException: Message: Service /usr/bin/safaridriver unexpectedly exited. Status code was: 1
    2813:  ============== 13 passed, 1 xfailed, 1 warning, 1 error in 7.11s ===============
    2814:  ================================================================================
    2815:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/visibility_tests.py/test_attempts/attempt_1.log
    2816:  /Users/runner/.bazel/execroot/_main/bazel-out/darwin_arm64-fastbuild/testlogs/py/test-safari-test/selenium/webdriver/common/visibility_tests.py/test_attempts/attempt_2.log
    2817:  �[32mINFO: �[0mFrom Testing //py:test-safari-test/selenium/webdriver/common/visibility_tests.py:
    2818:  �[32m[2,048 / 2,049]�[0m 29...

    using basic with username and password."""
    using basic with username and password.

    Support values: Bearer, X-API-Key. For others, please use `extra_headers` instead
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Should we be having these as constants that people can pass in? It will prevent typos and give people examples of what to us

    Copy link
    Member Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    @AutomatedTester, I updated it to use enum. This arg has a default value and is newly added, so I think it will not have a regression impact. Can you check if it is fine?

    if auth_type == "oauth" and self.token:
    return {"Authorization": f"OAuth {self.token}"}
    return {"Authorization": f"{AuthType.BASIC.value} {encoded_credentials}"}
    if self.auth_type is AuthType.BEARER and self.token:
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    I think this looks so much better!

    @AutomatedTester AutomatedTester merged commit e202389 into trunk Nov 9, 2024
    13 of 15 checks passed
    @AutomatedTester AutomatedTester deleted the py-client-config branch November 9, 2024 15:09
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants