Feature/shadow root support (#43) #19
GitHub Actions / Test Results
failed
Dec 14, 2024 in 0s
1 fail, 2 skipped, 73 pass in 14s
Annotations
Check warning on line 0 in test.test_page
github-actions / Test Results
test_create_page_from_page (test.test_page) failed
test-results/tests.xml [took 0s]
Raw output
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally.
(session not created: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
Stacktrace:
#0 0x5597624c534a <unknown>
#1 0x559761fdb6e0 <unknown>
#2 0x559762012dc8 <unknown>
#3 0x55976200e926 <unknown>
#4 0x55976205a6f6 <unknown>
#5 0x559762059d46 <unknown>
#6 0x55976204e203 <unknown>
#7 0x55976201ccc0 <unknown>
#8 0x55976201dc9e <unknown>
#9 0x559762492d3b <unknown>
#10 0x559762496cc2 <unknown>
#11 0x55976247fb6c <unknown>
#12 0x559762497837 <unknown>
#13 0x55976246510f <unknown>
#14 0x5597624b45a8 <unknown>
#15 0x5597624b4770 <unknown>
#16 0x5597624c41c6 <unknown>
#17 0x7f51a809ca94 <unknown>
#18 0x7f51a8129c3c <unknown>
def test_create_page_from_page():
page_factory = inject.instance(PageFactory)
> page = page_factory.create_page(Page)
test/test_page.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
paf/page.py:18: in create_page
webdriver = inject.instance(WebDriverManager).get_webdriver(WebDriverRequest())
paf/manager.py:75: in get_webdriver
driver = driver_class(options=options, service=service)
/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/selenium/webdriver/chrome/webdriver.py:45: in __init__
super().__init__(
/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/selenium/webdriver/chromium/webdriver.py:66: in __init__
super().__init__(command_executor=executor, options=options)
/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py:212: in __init__
self.start_session(capabilities)
/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py:299: in start_session
response = self.execute(Command.NEW_SESSION, caps)["value"]
/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py:354: in execute
self.error_handler.check_response(response)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f41fd24a990>
response = {'status': 500, 'value': '{"value":{"error":"session not created","message":"session not created: Chrome failed to sta...\\n#16 0x5597624c41c6 \\u003Cunknown>\\n#17 0x7f51a809ca94 \\u003Cunknown>\\n#18 0x7f51a8129c3c \\u003Cunknown>\\n"}}'}
def check_response(self, response: Dict[str, Any]) -> None:
"""Checks that a JSON response from the WebDriver does not have an
error.
:Args:
- response - The JSON response from the WebDriver server as a dictionary
object.
:Raises: If the response contains an error message.
"""
status = response.get("status", None)
if not status or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen: str = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get("value", None)
if value_json and isinstance(value_json, str):
import json
try:
value = json.loads(value_json)
if len(value) == 1:
value = value["value"]
status = value.get("error", None)
if not status:
status = value.get("status", ErrorCode.UNKNOWN_ERROR)
message = value.get("value") or value.get("message")
if not isinstance(message, str):
value = message
message = message.get("message")
else:
message = value.get("message", None)
except ValueError:
pass
exception_class: Type[WebDriverException]
e = ErrorCode()
error_codes = [item for item in dir(e) if not item.startswith("__")]
for error_code in error_codes:
error_info = getattr(ErrorCode, error_code)
if isinstance(error_info, list) and status in error_info:
exception_class = getattr(ExceptionMapping, error_code, WebDriverException)
break
else:
exception_class = WebDriverException
if not value:
value = response["value"]
if isinstance(value, str):
raise exception_class(value)
if message == "" and "message" in value:
message = value["message"]
screen = None # type: ignore[assignment]
if "screen" in value:
screen = value["screen"]
stacktrace = None
st_value = value.get("stackTrace") or value.get("stacktrace")
if st_value:
if isinstance(st_value, str):
stacktrace = st_value.split("\n")
else:
stacktrace = []
try:
for frame in st_value:
line = frame.get("lineNumber", "")
file = frame.get("fileName", "<anonymous>")
if line:
file = f"{file}:{line}"
meth = frame.get("methodName", "<anonymous>")
if "className" in frame:
meth = f"{frame['className']}.{meth}"
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == UnexpectedAlertPresentException:
alert_text = None
if "data" in value:
alert_text = value["data"].get("text")
elif "alert" in value:
alert_text = value["alert"].get("text")
raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally.
E (session not created: DevToolsActivePort file doesn't exist)
E (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
E Stacktrace:
E #0 0x5597624c534a <unknown>
E #1 0x559761fdb6e0 <unknown>
E #2 0x559762012dc8 <unknown>
E #3 0x55976200e926 <unknown>
E #4 0x55976205a6f6 <unknown>
E #5 0x559762059d46 <unknown>
E #6 0x55976204e203 <unknown>
E #7 0x55976201ccc0 <unknown>
E #8 0x55976201dc9e <unknown>
E #9 0x559762492d3b <unknown>
E #10 0x559762496cc2 <unknown>
E #11 0x55976247fb6c <unknown>
E #12 0x559762497837 <unknown>
E #13 0x55976246510f <unknown>
E #14 0x5597624b45a8 <unknown>
E #15 0x5597624b4770 <unknown>
E #16 0x5597624c41c6 <unknown>
E #17 0x7f51a809ca94 <unknown>
E #18 0x7f51a8129c3c <unknown>
/opt/hostedtoolcache/Python/3.11.11/x64/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py:229: SessionNotCreatedException
Check notice on line 0 in .github
github-actions / Test Results
2 skipped tests found
There are 2 skipped tests, see "Raw output" for the full list of skipped tests.
Raw output
test.test_manager ‑ test_remote_webdriver
test.test_manager ‑ test_take_screenshot_fails_read_only
Check notice on line 0 in .github
github-actions / Test Results
76 tests found
There are 76 tests, see "Raw output" for the full list of tests.
Raw output
test.test_component ‑ test_component_list
test.test_component ‑ test_component_list_name
test.test_component ‑ test_component_name
test.test_component ‑ test_component_name_path
test.test_component ‑ test_component_scrolling
test.test_control ‑ test_change
test.test_control ‑ test_change_first
test.test_control ‑ test_change_second
test.test_demo_mode ‑ test_highlight_action
test.test_demo_mode ‑ test_highlight_action_success_skips_highlighting
test.test_demo_mode ‑ test_highlight_failed_assertion
test.test_demo_mode ‑ test_highlight_not_found_log
test.test_demo_mode ‑ test_highlight_passed_assertion
test.test_detect_webdriver ‑ test_detect_webdriver
test.test_detect_webdriver ‑ test_hide_webdriver
test.test_exceptions ‑ test_assertion_error_label
test.test_exceptions ‑ test_catch_assertion_error
test.test_exceptions ‑ test_nested_retry_exception_message
test.test_javascript ‑ test_viewport
test.test_locator ‑ test_By_to_XPath
test.test_locator ‑ test_By_to_XPath_fails
test.test_locator ‑ test_By_xpath_XPath
test.test_locator ‑ test_XPath_group
test.test_locator ‑ test_XPath_with_By
test.test_locator ‑ test_XPath_with_XPath
test.test_locator ‑ test_class_selection
test.test_locator ‑ test_deep_selection
test.test_locator ‑ test_enclosing
test.test_locator ‑ test_position
test.test_locator ‑ test_select
test.test_locator ‑ test_select_sibling
test.test_locator ‑ test_text_functions
test.test_locator ‑ test_to_string_filtered
test.test_manager ‑ test_empty_request
test.test_manager ‑ test_given_chrome_options
test.test_manager ‑ test_manager_singleton
test.test_manager ‑ test_not_given_chrome_options
test.test_manager ‑ test_remote_webdriver
test.test_manager ‑ test_shutdown_by_session_key
test.test_manager ‑ test_shutdown_unknown_session_fails
test.test_manager ‑ test_take_screenshot
test.test_manager ‑ test_take_screenshot_fails_invalid_session
test.test_manager ‑ test_take_screenshot_fails_read_only
test.test_manager ‑ test_thread_singleton
test.test_manager ‑ test_unknown_browser_fails
test.test_page ‑ test_assertions
test.test_page ‑ test_create_page_from_page
test.test_page ‑ test_create_page_without_webdriver
test.test_page ‑ test_scroll_until_visible
test.test_request ‑ test_browser
test.test_request ‑ test_browser_version
test.test_request ‑ test_server_url
test.test_request ‑ test_window_size
test.test_uielement ‑ test_action_on_non_interactable_fails
test.test_uielement ‑ test_actions
test.test_uielement ‑ test_assertions
test.test_uielement ‑ test_basics
test.test_uielement ‑ test_count_nonexistent_fails
test.test_uielement ‑ test_drag_and_drop
test.test_uielement ‑ test_fail_message
test.test_uielement ‑ test_find_sub_elements_list
test.test_uielement ‑ test_form
test.test_uielement ‑ test_frames
test.test_uielement ‑ test_highlight
test.test_uielement ‑ test_highlight_nonexistent_fails
test.test_uielement ‑ test_inexistent_sub_element
test.test_uielement ‑ test_inexistent_ui_element_wrapper
test.test_uielement ‑ test_locate_displayed
test.test_uielement ‑ test_not_unique_fails
test.test_uielement ‑ test_retry
test.test_uielement ‑ test_screenshot
test.test_uielement ‑ test_scroll_to_visible
test.test_uielement ‑ test_text_assertion_fails
test.test_uielement ‑ test_uninitialized_ui_element_fails
test.test_uielement ‑ test_untested_assertion_raises
test.test_uielement ‑ test_wait
Loading