chore: use poetry 1.4.2 in the CI #382
test-report-Object__firefox_test_splunk_ta_example_addon_alert_actions ❌
❌ test-results/test.xml
9 tests were completed in 601s with 0 passed, 9 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
pytest | 9❌ | 601s |
❌ pytest
tests.ui.test_splunk_ta_example_addon_alert_actions.firefox_TestAlertActions
❌ test_action_in_list
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f75298be050>
❌ test_dropdown_list
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529444610>
❌ test_account_functionality
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529445690>
❌ test_checkbox
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f75294452d0>
❌ test_single_select
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f75294468c0>
❌ test_toggle
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529447e80>
❌ test_alert_action_save
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529444250>
❌ test_alert_help_text_entity
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529446ec0>
❌ test_alert_action_label_entity
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f75294460e0>
Annotations
Check failure on line 0 in test-results/test.xml
github-actions / test-report-Object__firefox_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.firefox_TestAlertActions ► test_action_in_list
Failed test found in:
test-results/test.xml
Error:
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f75298be050>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f75298be050>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f75291d6e90>
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
def test_action_in_list(self, ucc_smartx_selenium_helper):
alert_page = AlertPage(ucc_smartx_selenium_helper, None)
> alert_page.alert_entity.open()
tests/ui/test_splunk_ta_example_addon_alert_actions.py:63:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f752917bb80>
def open(self):
"""
Open the required page. Page(super) class opens the page by default.
"""
> self.add_alert.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/__init__.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.components.button.Button object at 0x7f75291ba590>
def click(self):
"""
Click on the button
"""
> self.container.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/components/button.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="c0b28858e7da4402a51f2712fdd19d0a", element="ea00b073-48ed-4c76-8be7-b9835fe506eb")>
def click(self):
"""Clicks the element."""
> self._execute(Command.CLICK_ELEMENT)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="c0b28858e7da4402a51f2712fdd19d0a", element="ea00b073-48ed-4c76-8be7-b9835fe506eb")>
command = 'clickElement'
params = {'id': 'ea00b073-48ed-4c76-8be7-b9835fe506eb', 'sessionId': 'c0b28858e7da4402a51f2712fdd19d0a'}
def _execute(self, command, params=None):
"""Executes a command against the underlying HTML element.
Args:
command: The name of the command to _execute as a string.
params: A dictionary of named parameters to send with the command.
Returns:
The command's JSON response loaded into a dictionary object.
"""
if not params:
params = {}
params['id'] = self._id
> return self._parent.execute(command, params)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webdriver.WebDriver (session="c0b28858e7da4402a51f2712fdd19d0a")>
driver_command = 'clickElement'
params = {'id': 'ea00b073-48ed-4c76-8be7-b9835fe506eb'}
def execute(self, driver_command, params=None):
"""
Sends a command to be executed by a command.CommandExecutor.
:Args:
- driver_command: The name of the command to execute as a string.
- params: A dictionary of named parameters to send with the command.
:Returns:
The command's JSON response loaded into a dictionary object.
"""
if self.session_id is not None:
if not params:
params = {'sessionId': self.session_id}
elif 'sessionId' not in params:
params['sessionId'] = self.session_id
params = self._wrap_value(params)
response = self.command_executor.execute(driver_command, params)
if response:
> self.error_handler.check_response(response)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:321:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f75291d7070>
response = {'status': 400, 'value': '{"value": {"stacktrace": "RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8...=\\"ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf\\"> obscures it", "error": "element click intercepted"}}'}
def check_response(self, response):
"""
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 status is None or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get('value', None)
if value_json and isinstance(value_json, basestring):
import json
try:
value = json.loads(value_json)
if len(value.keys()) == 1:
value = value['value']
status = value.get('error', None)
if status is None:
status = value["status"]
message = value["value"]
if not isinstance(message, basestring):
value = message
message = message.get('message')
else:
message = value.get('message', None)
except ValueError:
pass
exception_class = ErrorInResponseException
if status in ErrorCode.NO_SUCH_ELEMENT:
exception_class = NoSuchElementException
elif status in ErrorCode.NO_SUCH_FRAME:
exception_class = NoSuchFrameException
elif status in ErrorCode.NO_SUCH_WINDOW:
exception_class = NoSuchWindowException
elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
exception_class = StaleElementReferenceException
elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
exception_class = ElementNotVisibleException
elif status in ErrorCode.INVALID_ELEMENT_STATE:
exception_class = InvalidElementStateException
elif status in ErrorCode.INVALID_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
exception_class = InvalidSelectorException
elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
exception_class = ElementNotSelectableException
elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
exception_class = ElementNotInteractableException
elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
exception_class = InvalidCookieDomainException
elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
exception_class = UnableToSetCookieException
elif status in ErrorCode.TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.SCRIPT_TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.UNKNOWN_ERROR:
exception_class = WebDriverException
elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
exception_class = UnexpectedAlertPresentException
elif status in ErrorCode.NO_ALERT_OPEN:
exception_class = NoAlertPresentException
elif status in ErrorCode.IME_NOT_AVAILABLE:
exception_class = ImeNotAvailableException
elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
exception_class = ImeActivationFailedException
elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
exception_class = MoveTargetOutOfBoundsException
elif status in ErrorCode.JAVASCRIPT_ERROR:
exception_class = JavascriptException
elif status in ErrorCode.SESSION_NOT_CREATED:
exception_class = SessionNotCreatedException
elif status in ErrorCode.INVALID_ARGUMENT:
exception_class = InvalidArgumentException
elif status in ErrorCode.NO_SUCH_COOKIE:
exception_class = NoSuchCookieException
elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
exception_class = ScreenshotException
elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
exception_class = ElementClickInterceptedException
elif status in ErrorCode.INSECURE_CERTIFICATE:
exception_class = InsecureCertificateException
elif status in ErrorCode.INVALID_COORDINATES:
exception_class = InvalidCoordinatesException
elif status in ErrorCode.INVALID_SESSION_ID:
exception_class = InvalidSessionIdException
elif status in ErrorCode.UNKNOWN_METHOD:
exception_class = UnknownMethodException
else:
exception_class = WebDriverException
if value == '' or value is None:
value = response['value']
if isinstance(value, basestring):
if exception_class == ErrorInResponseException:
raise exception_class(response, value)
raise exception_class(value)
if message == "" and 'message' in value:
message = value['message']
screen = None
if 'screen' in value:
screen = value['screen']
stacktrace = None
if 'stackTrace' in value and value['stackTrace']:
stacktrace = []
try:
for frame in value['stackTrace']:
line = self._value_or_default(frame, 'lineNumber', '')
file = self._value_or_default(frame, 'fileName', '<anonymous>')
if line:
file = "%s:%s" % (file, line)
meth = self._value_or_default(frame, 'methodName', '<anonymous>')
if 'className' in frame:
meth = "%s.%s" % (frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == ErrorInResponseException:
raise exception_class(response, message)
elif 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)
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.ElementClickInterceptedException: Message: Element <a class="btn new-alert-button" href="#"> is not clickable at point (1214,70) because another element <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf"> obscures it
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: ElementClickInterceptedException
Check failure on line 0 in test-results/test.xml
github-actions / test-report-Object__firefox_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.firefox_TestAlertActions ► test_dropdown_list
Failed test found in:
test-results/test.xml
Error:
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529444610>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529444610>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f7527b041f0>
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
def test_dropdown_list(self, ucc_smartx_selenium_helper):
alert_page = AlertPage(ucc_smartx_selenium_helper, None)
> alert_page.alert_entity.open()
tests/ui/test_splunk_ta_example_addon_alert_actions.py:75:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f7527b07cd0>
def open(self):
"""
Open the required page. Page(super) class opens the page by default.
"""
> self.add_alert.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/__init__.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.components.button.Button object at 0x7f7527b04730>
def click(self):
"""
Click on the button
"""
> self.container.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/components/button.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="b1d1798dfc284c44b8d768504c94a09f", element="acc1e5da-6176-4919-991c-4bdbf450b458")>
def click(self):
"""Clicks the element."""
> self._execute(Command.CLICK_ELEMENT)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="b1d1798dfc284c44b8d768504c94a09f", element="acc1e5da-6176-4919-991c-4bdbf450b458")>
command = 'clickElement'
params = {'id': 'acc1e5da-6176-4919-991c-4bdbf450b458', 'sessionId': 'b1d1798dfc284c44b8d768504c94a09f'}
def _execute(self, command, params=None):
"""Executes a command against the underlying HTML element.
Args:
command: The name of the command to _execute as a string.
params: A dictionary of named parameters to send with the command.
Returns:
The command's JSON response loaded into a dictionary object.
"""
if not params:
params = {}
params['id'] = self._id
> return self._parent.execute(command, params)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webdriver.WebDriver (session="b1d1798dfc284c44b8d768504c94a09f")>
driver_command = 'clickElement'
params = {'id': 'acc1e5da-6176-4919-991c-4bdbf450b458'}
def execute(self, driver_command, params=None):
"""
Sends a command to be executed by a command.CommandExecutor.
:Args:
- driver_command: The name of the command to execute as a string.
- params: A dictionary of named parameters to send with the command.
:Returns:
The command's JSON response loaded into a dictionary object.
"""
if self.session_id is not None:
if not params:
params = {'sessionId': self.session_id}
elif 'sessionId' not in params:
params['sessionId'] = self.session_id
params = self._wrap_value(params)
response = self.command_executor.execute(driver_command, params)
if response:
> self.error_handler.check_response(response)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:321:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f7527b041c0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8...=\\"ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf\\"> obscures it", "error": "element click intercepted"}}'}
def check_response(self, response):
"""
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 status is None or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get('value', None)
if value_json and isinstance(value_json, basestring):
import json
try:
value = json.loads(value_json)
if len(value.keys()) == 1:
value = value['value']
status = value.get('error', None)
if status is None:
status = value["status"]
message = value["value"]
if not isinstance(message, basestring):
value = message
message = message.get('message')
else:
message = value.get('message', None)
except ValueError:
pass
exception_class = ErrorInResponseException
if status in ErrorCode.NO_SUCH_ELEMENT:
exception_class = NoSuchElementException
elif status in ErrorCode.NO_SUCH_FRAME:
exception_class = NoSuchFrameException
elif status in ErrorCode.NO_SUCH_WINDOW:
exception_class = NoSuchWindowException
elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
exception_class = StaleElementReferenceException
elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
exception_class = ElementNotVisibleException
elif status in ErrorCode.INVALID_ELEMENT_STATE:
exception_class = InvalidElementStateException
elif status in ErrorCode.INVALID_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
exception_class = InvalidSelectorException
elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
exception_class = ElementNotSelectableException
elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
exception_class = ElementNotInteractableException
elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
exception_class = InvalidCookieDomainException
elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
exception_class = UnableToSetCookieException
elif status in ErrorCode.TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.SCRIPT_TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.UNKNOWN_ERROR:
exception_class = WebDriverException
elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
exception_class = UnexpectedAlertPresentException
elif status in ErrorCode.NO_ALERT_OPEN:
exception_class = NoAlertPresentException
elif status in ErrorCode.IME_NOT_AVAILABLE:
exception_class = ImeNotAvailableException
elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
exception_class = ImeActivationFailedException
elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
exception_class = MoveTargetOutOfBoundsException
elif status in ErrorCode.JAVASCRIPT_ERROR:
exception_class = JavascriptException
elif status in ErrorCode.SESSION_NOT_CREATED:
exception_class = SessionNotCreatedException
elif status in ErrorCode.INVALID_ARGUMENT:
exception_class = InvalidArgumentException
elif status in ErrorCode.NO_SUCH_COOKIE:
exception_class = NoSuchCookieException
elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
exception_class = ScreenshotException
elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
exception_class = ElementClickInterceptedException
elif status in ErrorCode.INSECURE_CERTIFICATE:
exception_class = InsecureCertificateException
elif status in ErrorCode.INVALID_COORDINATES:
exception_class = InvalidCoordinatesException
elif status in ErrorCode.INVALID_SESSION_ID:
exception_class = InvalidSessionIdException
elif status in ErrorCode.UNKNOWN_METHOD:
exception_class = UnknownMethodException
else:
exception_class = WebDriverException
if value == '' or value is None:
value = response['value']
if isinstance(value, basestring):
if exception_class == ErrorInResponseException:
raise exception_class(response, value)
raise exception_class(value)
if message == "" and 'message' in value:
message = value['message']
screen = None
if 'screen' in value:
screen = value['screen']
stacktrace = None
if 'stackTrace' in value and value['stackTrace']:
stacktrace = []
try:
for frame in value['stackTrace']:
line = self._value_or_default(frame, 'lineNumber', '')
file = self._value_or_default(frame, 'fileName', '<anonymous>')
if line:
file = "%s:%s" % (file, line)
meth = self._value_or_default(frame, 'methodName', '<anonymous>')
if 'className' in frame:
meth = "%s.%s" % (frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == ErrorInResponseException:
raise exception_class(response, message)
elif 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)
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.ElementClickInterceptedException: Message: Element <a class="btn new-alert-button" href="#"> is not clickable at point (1214,70) because another element <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf"> obscures it
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: ElementClickInterceptedException
Check failure on line 0 in test-results/test.xml
github-actions / test-report-Object__firefox_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.firefox_TestAlertActions ► test_account_functionality
Failed test found in:
test-results/test.xml
Error:
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529445690>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529445690>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f7527b3a770>
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
def test_account_functionality(self, ucc_smartx_selenium_helper):
alert_page = AlertPage(ucc_smartx_selenium_helper, None)
> alert_page.alert_entity.open()
tests/ui/test_splunk_ta_example_addon_alert_actions.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f7527b3b2e0>
def open(self):
"""
Open the required page. Page(super) class opens the page by default.
"""
> self.add_alert.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/__init__.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.components.button.Button object at 0x7f7527b3bee0>
def click(self):
"""
Click on the button
"""
> self.container.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/components/button.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="c3d65cca3e9649ceaf77a2b19b86e291", element="a468d046-338f-46fd-b1a2-415bb35c3ddb")>
def click(self):
"""Clicks the element."""
> self._execute(Command.CLICK_ELEMENT)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="c3d65cca3e9649ceaf77a2b19b86e291", element="a468d046-338f-46fd-b1a2-415bb35c3ddb")>
command = 'clickElement'
params = {'id': 'a468d046-338f-46fd-b1a2-415bb35c3ddb', 'sessionId': 'c3d65cca3e9649ceaf77a2b19b86e291'}
def _execute(self, command, params=None):
"""Executes a command against the underlying HTML element.
Args:
command: The name of the command to _execute as a string.
params: A dictionary of named parameters to send with the command.
Returns:
The command's JSON response loaded into a dictionary object.
"""
if not params:
params = {}
params['id'] = self._id
> return self._parent.execute(command, params)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webdriver.WebDriver (session="c3d65cca3e9649ceaf77a2b19b86e291")>
driver_command = 'clickElement'
params = {'id': 'a468d046-338f-46fd-b1a2-415bb35c3ddb'}
def execute(self, driver_command, params=None):
"""
Sends a command to be executed by a command.CommandExecutor.
:Args:
- driver_command: The name of the command to execute as a string.
- params: A dictionary of named parameters to send with the command.
:Returns:
The command's JSON response loaded into a dictionary object.
"""
if self.session_id is not None:
if not params:
params = {'sessionId': self.session_id}
elif 'sessionId' not in params:
params['sessionId'] = self.session_id
params = self._wrap_value(params)
response = self.command_executor.execute(driver_command, params)
if response:
> self.error_handler.check_response(response)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:321:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f7527b3a7d0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8...=\\"ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf\\"> obscures it", "error": "element click intercepted"}}'}
def check_response(self, response):
"""
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 status is None or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get('value', None)
if value_json and isinstance(value_json, basestring):
import json
try:
value = json.loads(value_json)
if len(value.keys()) == 1:
value = value['value']
status = value.get('error', None)
if status is None:
status = value["status"]
message = value["value"]
if not isinstance(message, basestring):
value = message
message = message.get('message')
else:
message = value.get('message', None)
except ValueError:
pass
exception_class = ErrorInResponseException
if status in ErrorCode.NO_SUCH_ELEMENT:
exception_class = NoSuchElementException
elif status in ErrorCode.NO_SUCH_FRAME:
exception_class = NoSuchFrameException
elif status in ErrorCode.NO_SUCH_WINDOW:
exception_class = NoSuchWindowException
elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
exception_class = StaleElementReferenceException
elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
exception_class = ElementNotVisibleException
elif status in ErrorCode.INVALID_ELEMENT_STATE:
exception_class = InvalidElementStateException
elif status in ErrorCode.INVALID_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
exception_class = InvalidSelectorException
elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
exception_class = ElementNotSelectableException
elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
exception_class = ElementNotInteractableException
elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
exception_class = InvalidCookieDomainException
elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
exception_class = UnableToSetCookieException
elif status in ErrorCode.TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.SCRIPT_TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.UNKNOWN_ERROR:
exception_class = WebDriverException
elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
exception_class = UnexpectedAlertPresentException
elif status in ErrorCode.NO_ALERT_OPEN:
exception_class = NoAlertPresentException
elif status in ErrorCode.IME_NOT_AVAILABLE:
exception_class = ImeNotAvailableException
elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
exception_class = ImeActivationFailedException
elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
exception_class = MoveTargetOutOfBoundsException
elif status in ErrorCode.JAVASCRIPT_ERROR:
exception_class = JavascriptException
elif status in ErrorCode.SESSION_NOT_CREATED:
exception_class = SessionNotCreatedException
elif status in ErrorCode.INVALID_ARGUMENT:
exception_class = InvalidArgumentException
elif status in ErrorCode.NO_SUCH_COOKIE:
exception_class = NoSuchCookieException
elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
exception_class = ScreenshotException
elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
exception_class = ElementClickInterceptedException
elif status in ErrorCode.INSECURE_CERTIFICATE:
exception_class = InsecureCertificateException
elif status in ErrorCode.INVALID_COORDINATES:
exception_class = InvalidCoordinatesException
elif status in ErrorCode.INVALID_SESSION_ID:
exception_class = InvalidSessionIdException
elif status in ErrorCode.UNKNOWN_METHOD:
exception_class = UnknownMethodException
else:
exception_class = WebDriverException
if value == '' or value is None:
value = response['value']
if isinstance(value, basestring):
if exception_class == ErrorInResponseException:
raise exception_class(response, value)
raise exception_class(value)
if message == "" and 'message' in value:
message = value['message']
screen = None
if 'screen' in value:
screen = value['screen']
stacktrace = None
if 'stackTrace' in value and value['stackTrace']:
stacktrace = []
try:
for frame in value['stackTrace']:
line = self._value_or_default(frame, 'lineNumber', '')
file = self._value_or_default(frame, 'fileName', '<anonymous>')
if line:
file = "%s:%s" % (file, line)
meth = self._value_or_default(frame, 'methodName', '<anonymous>')
if 'className' in frame:
meth = "%s.%s" % (frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == ErrorInResponseException:
raise exception_class(response, message)
elif 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)
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.ElementClickInterceptedException: Message: Element <a class="btn new-alert-button" href="#"> is not clickable at point (1214,70) because another element <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf"> obscures it
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: ElementClickInterceptedException
Check failure on line 0 in test-results/test.xml
github-actions / test-report-Object__firefox_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.firefox_TestAlertActions ► test_checkbox
Failed test found in:
test-results/test.xml
Error:
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f75294452d0>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f75294452d0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f75291ba170>
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
def test_checkbox(self, ucc_smartx_selenium_helper):
alert_page = AlertPage(ucc_smartx_selenium_helper, None)
> alert_page.alert_entity.open()
tests/ui/test_splunk_ta_example_addon_alert_actions.py:105:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f75291baf20>
def open(self):
"""
Open the required page. Page(super) class opens the page by default.
"""
> self.add_alert.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/__init__.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.components.button.Button object at 0x7f7527af6c80>
def click(self):
"""
Click on the button
"""
> self.container.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/components/button.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="19f1e70481c1444c936569f3c7e99e21", element="c59dab9e-e77d-4533-aab3-a7661445b4c1")>
def click(self):
"""Clicks the element."""
> self._execute(Command.CLICK_ELEMENT)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="19f1e70481c1444c936569f3c7e99e21", element="c59dab9e-e77d-4533-aab3-a7661445b4c1")>
command = 'clickElement'
params = {'id': 'c59dab9e-e77d-4533-aab3-a7661445b4c1', 'sessionId': '19f1e70481c1444c936569f3c7e99e21'}
def _execute(self, command, params=None):
"""Executes a command against the underlying HTML element.
Args:
command: The name of the command to _execute as a string.
params: A dictionary of named parameters to send with the command.
Returns:
The command's JSON response loaded into a dictionary object.
"""
if not params:
params = {}
params['id'] = self._id
> return self._parent.execute(command, params)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webdriver.WebDriver (session="19f1e70481c1444c936569f3c7e99e21")>
driver_command = 'clickElement'
params = {'id': 'c59dab9e-e77d-4533-aab3-a7661445b4c1'}
def execute(self, driver_command, params=None):
"""
Sends a command to be executed by a command.CommandExecutor.
:Args:
- driver_command: The name of the command to execute as a string.
- params: A dictionary of named parameters to send with the command.
:Returns:
The command's JSON response loaded into a dictionary object.
"""
if self.session_id is not None:
if not params:
params = {'sessionId': self.session_id}
elif 'sessionId' not in params:
params['sessionId'] = self.session_id
params = self._wrap_value(params)
response = self.command_executor.execute(driver_command, params)
if response:
> self.error_handler.check_response(response)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:321:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f75291bbdf0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8...=\\"ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf\\"> obscures it", "error": "element click intercepted"}}'}
def check_response(self, response):
"""
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 status is None or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get('value', None)
if value_json and isinstance(value_json, basestring):
import json
try:
value = json.loads(value_json)
if len(value.keys()) == 1:
value = value['value']
status = value.get('error', None)
if status is None:
status = value["status"]
message = value["value"]
if not isinstance(message, basestring):
value = message
message = message.get('message')
else:
message = value.get('message', None)
except ValueError:
pass
exception_class = ErrorInResponseException
if status in ErrorCode.NO_SUCH_ELEMENT:
exception_class = NoSuchElementException
elif status in ErrorCode.NO_SUCH_FRAME:
exception_class = NoSuchFrameException
elif status in ErrorCode.NO_SUCH_WINDOW:
exception_class = NoSuchWindowException
elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
exception_class = StaleElementReferenceException
elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
exception_class = ElementNotVisibleException
elif status in ErrorCode.INVALID_ELEMENT_STATE:
exception_class = InvalidElementStateException
elif status in ErrorCode.INVALID_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
exception_class = InvalidSelectorException
elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
exception_class = ElementNotSelectableException
elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
exception_class = ElementNotInteractableException
elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
exception_class = InvalidCookieDomainException
elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
exception_class = UnableToSetCookieException
elif status in ErrorCode.TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.SCRIPT_TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.UNKNOWN_ERROR:
exception_class = WebDriverException
elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
exception_class = UnexpectedAlertPresentException
elif status in ErrorCode.NO_ALERT_OPEN:
exception_class = NoAlertPresentException
elif status in ErrorCode.IME_NOT_AVAILABLE:
exception_class = ImeNotAvailableException
elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
exception_class = ImeActivationFailedException
elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
exception_class = MoveTargetOutOfBoundsException
elif status in ErrorCode.JAVASCRIPT_ERROR:
exception_class = JavascriptException
elif status in ErrorCode.SESSION_NOT_CREATED:
exception_class = SessionNotCreatedException
elif status in ErrorCode.INVALID_ARGUMENT:
exception_class = InvalidArgumentException
elif status in ErrorCode.NO_SUCH_COOKIE:
exception_class = NoSuchCookieException
elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
exception_class = ScreenshotException
elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
exception_class = ElementClickInterceptedException
elif status in ErrorCode.INSECURE_CERTIFICATE:
exception_class = InsecureCertificateException
elif status in ErrorCode.INVALID_COORDINATES:
exception_class = InvalidCoordinatesException
elif status in ErrorCode.INVALID_SESSION_ID:
exception_class = InvalidSessionIdException
elif status in ErrorCode.UNKNOWN_METHOD:
exception_class = UnknownMethodException
else:
exception_class = WebDriverException
if value == '' or value is None:
value = response['value']
if isinstance(value, basestring):
if exception_class == ErrorInResponseException:
raise exception_class(response, value)
raise exception_class(value)
if message == "" and 'message' in value:
message = value['message']
screen = None
if 'screen' in value:
screen = value['screen']
stacktrace = None
if 'stackTrace' in value and value['stackTrace']:
stacktrace = []
try:
for frame in value['stackTrace']:
line = self._value_or_default(frame, 'lineNumber', '')
file = self._value_or_default(frame, 'fileName', '<anonymous>')
if line:
file = "%s:%s" % (file, line)
meth = self._value_or_default(frame, 'methodName', '<anonymous>')
if 'className' in frame:
meth = "%s.%s" % (frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == ErrorInResponseException:
raise exception_class(response, message)
elif 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)
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.ElementClickInterceptedException: Message: Element <a class="btn new-alert-button" href="#"> is not clickable at point (1214,70) because another element <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf"> obscures it
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: ElementClickInterceptedException
Check failure on line 0 in test-results/test.xml
github-actions / test-report-Object__firefox_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.firefox_TestAlertActions ► test_single_select
Failed test found in:
test-results/test.xml
Error:
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f75294468c0>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f75294468c0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f7527b38550>
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
def test_single_select(self, ucc_smartx_selenium_helper):
alert_page = AlertPage(ucc_smartx_selenium_helper, None)
> alert_page.alert_entity.open()
tests/ui/test_splunk_ta_example_addon_alert_actions.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f7527b39ed0>
def open(self):
"""
Open the required page. Page(super) class opens the page by default.
"""
> self.add_alert.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/__init__.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.components.button.Button object at 0x7f7527cb51e0>
def click(self):
"""
Click on the button
"""
> self.container.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/components/button.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="853125bd05f8473d9470c0b4e59c2776", element="8760b05e-2d62-4379-bfd0-2af61ed6fa33")>
def click(self):
"""Clicks the element."""
> self._execute(Command.CLICK_ELEMENT)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="853125bd05f8473d9470c0b4e59c2776", element="8760b05e-2d62-4379-bfd0-2af61ed6fa33")>
command = 'clickElement'
params = {'id': '8760b05e-2d62-4379-bfd0-2af61ed6fa33', 'sessionId': '853125bd05f8473d9470c0b4e59c2776'}
def _execute(self, command, params=None):
"""Executes a command against the underlying HTML element.
Args:
command: The name of the command to _execute as a string.
params: A dictionary of named parameters to send with the command.
Returns:
The command's JSON response loaded into a dictionary object.
"""
if not params:
params = {}
params['id'] = self._id
> return self._parent.execute(command, params)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webdriver.WebDriver (session="853125bd05f8473d9470c0b4e59c2776")>
driver_command = 'clickElement'
params = {'id': '8760b05e-2d62-4379-bfd0-2af61ed6fa33'}
def execute(self, driver_command, params=None):
"""
Sends a command to be executed by a command.CommandExecutor.
:Args:
- driver_command: The name of the command to execute as a string.
- params: A dictionary of named parameters to send with the command.
:Returns:
The command's JSON response loaded into a dictionary object.
"""
if self.session_id is not None:
if not params:
params = {'sessionId': self.session_id}
elif 'sessionId' not in params:
params['sessionId'] = self.session_id
params = self._wrap_value(params)
response = self.command_executor.execute(driver_command, params)
if response:
> self.error_handler.check_response(response)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:321:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f7527b39ea0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8...=\\"ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf\\"> obscures it", "error": "element click intercepted"}}'}
def check_response(self, response):
"""
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 status is None or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get('value', None)
if value_json and isinstance(value_json, basestring):
import json
try:
value = json.loads(value_json)
if len(value.keys()) == 1:
value = value['value']
status = value.get('error', None)
if status is None:
status = value["status"]
message = value["value"]
if not isinstance(message, basestring):
value = message
message = message.get('message')
else:
message = value.get('message', None)
except ValueError:
pass
exception_class = ErrorInResponseException
if status in ErrorCode.NO_SUCH_ELEMENT:
exception_class = NoSuchElementException
elif status in ErrorCode.NO_SUCH_FRAME:
exception_class = NoSuchFrameException
elif status in ErrorCode.NO_SUCH_WINDOW:
exception_class = NoSuchWindowException
elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
exception_class = StaleElementReferenceException
elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
exception_class = ElementNotVisibleException
elif status in ErrorCode.INVALID_ELEMENT_STATE:
exception_class = InvalidElementStateException
elif status in ErrorCode.INVALID_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
exception_class = InvalidSelectorException
elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
exception_class = ElementNotSelectableException
elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
exception_class = ElementNotInteractableException
elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
exception_class = InvalidCookieDomainException
elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
exception_class = UnableToSetCookieException
elif status in ErrorCode.TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.SCRIPT_TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.UNKNOWN_ERROR:
exception_class = WebDriverException
elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
exception_class = UnexpectedAlertPresentException
elif status in ErrorCode.NO_ALERT_OPEN:
exception_class = NoAlertPresentException
elif status in ErrorCode.IME_NOT_AVAILABLE:
exception_class = ImeNotAvailableException
elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
exception_class = ImeActivationFailedException
elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
exception_class = MoveTargetOutOfBoundsException
elif status in ErrorCode.JAVASCRIPT_ERROR:
exception_class = JavascriptException
elif status in ErrorCode.SESSION_NOT_CREATED:
exception_class = SessionNotCreatedException
elif status in ErrorCode.INVALID_ARGUMENT:
exception_class = InvalidArgumentException
elif status in ErrorCode.NO_SUCH_COOKIE:
exception_class = NoSuchCookieException
elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
exception_class = ScreenshotException
elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
exception_class = ElementClickInterceptedException
elif status in ErrorCode.INSECURE_CERTIFICATE:
exception_class = InsecureCertificateException
elif status in ErrorCode.INVALID_COORDINATES:
exception_class = InvalidCoordinatesException
elif status in ErrorCode.INVALID_SESSION_ID:
exception_class = InvalidSessionIdException
elif status in ErrorCode.UNKNOWN_METHOD:
exception_class = UnknownMethodException
else:
exception_class = WebDriverException
if value == '' or value is None:
value = response['value']
if isinstance(value, basestring):
if exception_class == ErrorInResponseException:
raise exception_class(response, value)
raise exception_class(value)
if message == "" and 'message' in value:
message = value['message']
screen = None
if 'screen' in value:
screen = value['screen']
stacktrace = None
if 'stackTrace' in value and value['stackTrace']:
stacktrace = []
try:
for frame in value['stackTrace']:
line = self._value_or_default(frame, 'lineNumber', '')
file = self._value_or_default(frame, 'fileName', '<anonymous>')
if line:
file = "%s:%s" % (file, line)
meth = self._value_or_default(frame, 'methodName', '<anonymous>')
if 'className' in frame:
meth = "%s.%s" % (frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == ErrorInResponseException:
raise exception_class(response, message)
elif 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)
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.ElementClickInterceptedException: Message: Element <a class="btn new-alert-button" href="#"> is not clickable at point (1214,70) because another element <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf"> obscures it
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: ElementClickInterceptedException
Check failure on line 0 in test-results/test.xml
github-actions / test-report-Object__firefox_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.firefox_TestAlertActions ► test_toggle
Failed test found in:
test-results/test.xml
Error:
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529447e80>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529447e80>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f75291bb940>
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
def test_toggle(self, ucc_smartx_selenium_helper):
alert_page = AlertPage(ucc_smartx_selenium_helper, None)
> alert_page.alert_entity.open()
tests/ui/test_splunk_ta_example_addon_alert_actions.py:132:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f7527b3a8c0>
def open(self):
"""
Open the required page. Page(super) class opens the page by default.
"""
> self.add_alert.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/__init__.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.components.button.Button object at 0x7f7527b07eb0>
def click(self):
"""
Click on the button
"""
> self.container.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/components/button.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="19ca39cb76df4d14833627b228548e19", element="06587c24-2692-409f-b5b4-20cfbee5df70")>
def click(self):
"""Clicks the element."""
> self._execute(Command.CLICK_ELEMENT)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="19ca39cb76df4d14833627b228548e19", element="06587c24-2692-409f-b5b4-20cfbee5df70")>
command = 'clickElement'
params = {'id': '06587c24-2692-409f-b5b4-20cfbee5df70', 'sessionId': '19ca39cb76df4d14833627b228548e19'}
def _execute(self, command, params=None):
"""Executes a command against the underlying HTML element.
Args:
command: The name of the command to _execute as a string.
params: A dictionary of named parameters to send with the command.
Returns:
The command's JSON response loaded into a dictionary object.
"""
if not params:
params = {}
params['id'] = self._id
> return self._parent.execute(command, params)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webdriver.WebDriver (session="19ca39cb76df4d14833627b228548e19")>
driver_command = 'clickElement'
params = {'id': '06587c24-2692-409f-b5b4-20cfbee5df70'}
def execute(self, driver_command, params=None):
"""
Sends a command to be executed by a command.CommandExecutor.
:Args:
- driver_command: The name of the command to execute as a string.
- params: A dictionary of named parameters to send with the command.
:Returns:
The command's JSON response loaded into a dictionary object.
"""
if self.session_id is not None:
if not params:
params = {'sessionId': self.session_id}
elif 'sessionId' not in params:
params['sessionId'] = self.session_id
params = self._wrap_value(params)
response = self.command_executor.execute(driver_command, params)
if response:
> self.error_handler.check_response(response)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:321:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f75291b9ff0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8...=\\"ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf\\"> obscures it", "error": "element click intercepted"}}'}
def check_response(self, response):
"""
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 status is None or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get('value', None)
if value_json and isinstance(value_json, basestring):
import json
try:
value = json.loads(value_json)
if len(value.keys()) == 1:
value = value['value']
status = value.get('error', None)
if status is None:
status = value["status"]
message = value["value"]
if not isinstance(message, basestring):
value = message
message = message.get('message')
else:
message = value.get('message', None)
except ValueError:
pass
exception_class = ErrorInResponseException
if status in ErrorCode.NO_SUCH_ELEMENT:
exception_class = NoSuchElementException
elif status in ErrorCode.NO_SUCH_FRAME:
exception_class = NoSuchFrameException
elif status in ErrorCode.NO_SUCH_WINDOW:
exception_class = NoSuchWindowException
elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
exception_class = StaleElementReferenceException
elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
exception_class = ElementNotVisibleException
elif status in ErrorCode.INVALID_ELEMENT_STATE:
exception_class = InvalidElementStateException
elif status in ErrorCode.INVALID_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
exception_class = InvalidSelectorException
elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
exception_class = ElementNotSelectableException
elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
exception_class = ElementNotInteractableException
elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
exception_class = InvalidCookieDomainException
elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
exception_class = UnableToSetCookieException
elif status in ErrorCode.TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.SCRIPT_TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.UNKNOWN_ERROR:
exception_class = WebDriverException
elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
exception_class = UnexpectedAlertPresentException
elif status in ErrorCode.NO_ALERT_OPEN:
exception_class = NoAlertPresentException
elif status in ErrorCode.IME_NOT_AVAILABLE:
exception_class = ImeNotAvailableException
elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
exception_class = ImeActivationFailedException
elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
exception_class = MoveTargetOutOfBoundsException
elif status in ErrorCode.JAVASCRIPT_ERROR:
exception_class = JavascriptException
elif status in ErrorCode.SESSION_NOT_CREATED:
exception_class = SessionNotCreatedException
elif status in ErrorCode.INVALID_ARGUMENT:
exception_class = InvalidArgumentException
elif status in ErrorCode.NO_SUCH_COOKIE:
exception_class = NoSuchCookieException
elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
exception_class = ScreenshotException
elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
exception_class = ElementClickInterceptedException
elif status in ErrorCode.INSECURE_CERTIFICATE:
exception_class = InsecureCertificateException
elif status in ErrorCode.INVALID_COORDINATES:
exception_class = InvalidCoordinatesException
elif status in ErrorCode.INVALID_SESSION_ID:
exception_class = InvalidSessionIdException
elif status in ErrorCode.UNKNOWN_METHOD:
exception_class = UnknownMethodException
else:
exception_class = WebDriverException
if value == '' or value is None:
value = response['value']
if isinstance(value, basestring):
if exception_class == ErrorInResponseException:
raise exception_class(response, value)
raise exception_class(value)
if message == "" and 'message' in value:
message = value['message']
screen = None
if 'screen' in value:
screen = value['screen']
stacktrace = None
if 'stackTrace' in value and value['stackTrace']:
stacktrace = []
try:
for frame in value['stackTrace']:
line = self._value_or_default(frame, 'lineNumber', '')
file = self._value_or_default(frame, 'fileName', '<anonymous>')
if line:
file = "%s:%s" % (file, line)
meth = self._value_or_default(frame, 'methodName', '<anonymous>')
if 'className' in frame:
meth = "%s.%s" % (frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == ErrorInResponseException:
raise exception_class(response, message)
elif 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)
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.ElementClickInterceptedException: Message: Element <a class="btn new-alert-button" href="#"> is not clickable at point (1214,70) because another element <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf"> obscures it
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: ElementClickInterceptedException
Check failure on line 0 in test-results/test.xml
github-actions / test-report-Object__firefox_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.firefox_TestAlertActions ► test_alert_action_save
Failed test found in:
test-results/test.xml
Error:
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529444250>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529444250>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f7527b3b6a0>
clean_alert = None
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
@pytest.mark.sanity_test
def test_alert_action_save(self, ucc_smartx_selenium_helper, clean_alert):
alert_page = AlertPage(ucc_smartx_selenium_helper, None)
> alert_page.alert_entity.open()
tests/ui/test_splunk_ta_example_addon_alert_actions.py:146:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f75291babc0>
def open(self):
"""
Open the required page. Page(super) class opens the page by default.
"""
> self.add_alert.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/__init__.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.components.button.Button object at 0x7f75291ba470>
def click(self):
"""
Click on the button
"""
> self.container.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/components/button.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="9ddd5e497b2f49a3a8ac73f6c975f8ba", element="0c4809f0-2c89-4efd-8b0c-b7206ba20ff0")>
def click(self):
"""Clicks the element."""
> self._execute(Command.CLICK_ELEMENT)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="9ddd5e497b2f49a3a8ac73f6c975f8ba", element="0c4809f0-2c89-4efd-8b0c-b7206ba20ff0")>
command = 'clickElement'
params = {'id': '0c4809f0-2c89-4efd-8b0c-b7206ba20ff0', 'sessionId': '9ddd5e497b2f49a3a8ac73f6c975f8ba'}
def _execute(self, command, params=None):
"""Executes a command against the underlying HTML element.
Args:
command: The name of the command to _execute as a string.
params: A dictionary of named parameters to send with the command.
Returns:
The command's JSON response loaded into a dictionary object.
"""
if not params:
params = {}
params['id'] = self._id
> return self._parent.execute(command, params)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webdriver.WebDriver (session="9ddd5e497b2f49a3a8ac73f6c975f8ba")>
driver_command = 'clickElement'
params = {'id': '0c4809f0-2c89-4efd-8b0c-b7206ba20ff0'}
def execute(self, driver_command, params=None):
"""
Sends a command to be executed by a command.CommandExecutor.
:Args:
- driver_command: The name of the command to execute as a string.
- params: A dictionary of named parameters to send with the command.
:Returns:
The command's JSON response loaded into a dictionary object.
"""
if self.session_id is not None:
if not params:
params = {'sessionId': self.session_id}
elif 'sessionId' not in params:
params['sessionId'] = self.session_id
params = self._wrap_value(params)
response = self.command_executor.execute(driver_command, params)
if response:
> self.error_handler.check_response(response)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:321:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f7527b393f0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8...=\\"ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf\\"> obscures it", "error": "element click intercepted"}}'}
def check_response(self, response):
"""
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 status is None or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get('value', None)
if value_json and isinstance(value_json, basestring):
import json
try:
value = json.loads(value_json)
if len(value.keys()) == 1:
value = value['value']
status = value.get('error', None)
if status is None:
status = value["status"]
message = value["value"]
if not isinstance(message, basestring):
value = message
message = message.get('message')
else:
message = value.get('message', None)
except ValueError:
pass
exception_class = ErrorInResponseException
if status in ErrorCode.NO_SUCH_ELEMENT:
exception_class = NoSuchElementException
elif status in ErrorCode.NO_SUCH_FRAME:
exception_class = NoSuchFrameException
elif status in ErrorCode.NO_SUCH_WINDOW:
exception_class = NoSuchWindowException
elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
exception_class = StaleElementReferenceException
elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
exception_class = ElementNotVisibleException
elif status in ErrorCode.INVALID_ELEMENT_STATE:
exception_class = InvalidElementStateException
elif status in ErrorCode.INVALID_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
exception_class = InvalidSelectorException
elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
exception_class = ElementNotSelectableException
elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
exception_class = ElementNotInteractableException
elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
exception_class = InvalidCookieDomainException
elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
exception_class = UnableToSetCookieException
elif status in ErrorCode.TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.SCRIPT_TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.UNKNOWN_ERROR:
exception_class = WebDriverException
elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
exception_class = UnexpectedAlertPresentException
elif status in ErrorCode.NO_ALERT_OPEN:
exception_class = NoAlertPresentException
elif status in ErrorCode.IME_NOT_AVAILABLE:
exception_class = ImeNotAvailableException
elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
exception_class = ImeActivationFailedException
elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
exception_class = MoveTargetOutOfBoundsException
elif status in ErrorCode.JAVASCRIPT_ERROR:
exception_class = JavascriptException
elif status in ErrorCode.SESSION_NOT_CREATED:
exception_class = SessionNotCreatedException
elif status in ErrorCode.INVALID_ARGUMENT:
exception_class = InvalidArgumentException
elif status in ErrorCode.NO_SUCH_COOKIE:
exception_class = NoSuchCookieException
elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
exception_class = ScreenshotException
elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
exception_class = ElementClickInterceptedException
elif status in ErrorCode.INSECURE_CERTIFICATE:
exception_class = InsecureCertificateException
elif status in ErrorCode.INVALID_COORDINATES:
exception_class = InvalidCoordinatesException
elif status in ErrorCode.INVALID_SESSION_ID:
exception_class = InvalidSessionIdException
elif status in ErrorCode.UNKNOWN_METHOD:
exception_class = UnknownMethodException
else:
exception_class = WebDriverException
if value == '' or value is None:
value = response['value']
if isinstance(value, basestring):
if exception_class == ErrorInResponseException:
raise exception_class(response, value)
raise exception_class(value)
if message == "" and 'message' in value:
message = value['message']
screen = None
if 'screen' in value:
screen = value['screen']
stacktrace = None
if 'stackTrace' in value and value['stackTrace']:
stacktrace = []
try:
for frame in value['stackTrace']:
line = self._value_or_default(frame, 'lineNumber', '')
file = self._value_or_default(frame, 'fileName', '<anonymous>')
if line:
file = "%s:%s" % (file, line)
meth = self._value_or_default(frame, 'methodName', '<anonymous>')
if 'className' in frame:
meth = "%s.%s" % (frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == ErrorInResponseException:
raise exception_class(response, message)
elif 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)
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.ElementClickInterceptedException: Message: Element <a class="btn new-alert-button" href="#"> is not clickable at point (1214,70) because another element <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf"> obscures it
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: ElementClickInterceptedException
Check failure on line 0 in test-results/test.xml
github-actions / test-report-Object__firefox_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.firefox_TestAlertActions ► test_alert_help_text_entity
Failed test found in:
test-results/test.xml
Error:
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529446ec0>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f7529446ec0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f7527adbc70>
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
def test_alert_help_text_entity(self, ucc_smartx_selenium_helper):
alert_page = AlertPage(ucc_smartx_selenium_helper, None)
> alert_page.alert_entity.open()
tests/ui/test_splunk_ta_example_addon_alert_actions.py:170:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f7527adab30>
def open(self):
"""
Open the required page. Page(super) class opens the page by default.
"""
> self.add_alert.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/__init__.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.components.button.Button object at 0x7f7527b35330>
def click(self):
"""
Click on the button
"""
> self.container.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/components/button.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="00ed45c8f5f34f3cbb54e66abb0421b6", element="d01a952a-f129-4cec-9e82-5a0c0c0ebea6")>
def click(self):
"""Clicks the element."""
> self._execute(Command.CLICK_ELEMENT)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="00ed45c8f5f34f3cbb54e66abb0421b6", element="d01a952a-f129-4cec-9e82-5a0c0c0ebea6")>
command = 'clickElement'
params = {'id': 'd01a952a-f129-4cec-9e82-5a0c0c0ebea6', 'sessionId': '00ed45c8f5f34f3cbb54e66abb0421b6'}
def _execute(self, command, params=None):
"""Executes a command against the underlying HTML element.
Args:
command: The name of the command to _execute as a string.
params: A dictionary of named parameters to send with the command.
Returns:
The command's JSON response loaded into a dictionary object.
"""
if not params:
params = {}
params['id'] = self._id
> return self._parent.execute(command, params)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webdriver.WebDriver (session="00ed45c8f5f34f3cbb54e66abb0421b6")>
driver_command = 'clickElement'
params = {'id': 'd01a952a-f129-4cec-9e82-5a0c0c0ebea6'}
def execute(self, driver_command, params=None):
"""
Sends a command to be executed by a command.CommandExecutor.
:Args:
- driver_command: The name of the command to execute as a string.
- params: A dictionary of named parameters to send with the command.
:Returns:
The command's JSON response loaded into a dictionary object.
"""
if self.session_id is not None:
if not params:
params = {'sessionId': self.session_id}
elif 'sessionId' not in params:
params['sessionId'] = self.session_id
params = self._wrap_value(params)
response = self.command_executor.execute(driver_command, params)
if response:
> self.error_handler.check_response(response)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:321:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f7527adb490>
response = {'status': 400, 'value': '{"value": {"stacktrace": "RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8...=\\"ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf\\"> obscures it", "error": "element click intercepted"}}'}
def check_response(self, response):
"""
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 status is None or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get('value', None)
if value_json and isinstance(value_json, basestring):
import json
try:
value = json.loads(value_json)
if len(value.keys()) == 1:
value = value['value']
status = value.get('error', None)
if status is None:
status = value["status"]
message = value["value"]
if not isinstance(message, basestring):
value = message
message = message.get('message')
else:
message = value.get('message', None)
except ValueError:
pass
exception_class = ErrorInResponseException
if status in ErrorCode.NO_SUCH_ELEMENT:
exception_class = NoSuchElementException
elif status in ErrorCode.NO_SUCH_FRAME:
exception_class = NoSuchFrameException
elif status in ErrorCode.NO_SUCH_WINDOW:
exception_class = NoSuchWindowException
elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
exception_class = StaleElementReferenceException
elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
exception_class = ElementNotVisibleException
elif status in ErrorCode.INVALID_ELEMENT_STATE:
exception_class = InvalidElementStateException
elif status in ErrorCode.INVALID_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
exception_class = InvalidSelectorException
elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
exception_class = ElementNotSelectableException
elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
exception_class = ElementNotInteractableException
elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
exception_class = InvalidCookieDomainException
elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
exception_class = UnableToSetCookieException
elif status in ErrorCode.TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.SCRIPT_TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.UNKNOWN_ERROR:
exception_class = WebDriverException
elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
exception_class = UnexpectedAlertPresentException
elif status in ErrorCode.NO_ALERT_OPEN:
exception_class = NoAlertPresentException
elif status in ErrorCode.IME_NOT_AVAILABLE:
exception_class = ImeNotAvailableException
elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
exception_class = ImeActivationFailedException
elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
exception_class = MoveTargetOutOfBoundsException
elif status in ErrorCode.JAVASCRIPT_ERROR:
exception_class = JavascriptException
elif status in ErrorCode.SESSION_NOT_CREATED:
exception_class = SessionNotCreatedException
elif status in ErrorCode.INVALID_ARGUMENT:
exception_class = InvalidArgumentException
elif status in ErrorCode.NO_SUCH_COOKIE:
exception_class = NoSuchCookieException
elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
exception_class = ScreenshotException
elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
exception_class = ElementClickInterceptedException
elif status in ErrorCode.INSECURE_CERTIFICATE:
exception_class = InsecureCertificateException
elif status in ErrorCode.INVALID_COORDINATES:
exception_class = InvalidCoordinatesException
elif status in ErrorCode.INVALID_SESSION_ID:
exception_class = InvalidSessionIdException
elif status in ErrorCode.UNKNOWN_METHOD:
exception_class = UnknownMethodException
else:
exception_class = WebDriverException
if value == '' or value is None:
value = response['value']
if isinstance(value, basestring):
if exception_class == ErrorInResponseException:
raise exception_class(response, value)
raise exception_class(value)
if message == "" and 'message' in value:
message = value['message']
screen = None
if 'screen' in value:
screen = value['screen']
stacktrace = None
if 'stackTrace' in value and value['stackTrace']:
stacktrace = []
try:
for frame in value['stackTrace']:
line = self._value_or_default(frame, 'lineNumber', '')
file = self._value_or_default(frame, 'fileName', '<anonymous>')
if line:
file = "%s:%s" % (file, line)
meth = self._value_or_default(frame, 'methodName', '<anonymous>')
if 'className' in frame:
meth = "%s.%s" % (frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == ErrorInResponseException:
raise exception_class(response, message)
elif 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)
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.ElementClickInterceptedException: Message: Element <a class="btn new-alert-button" href="#"> is not clickable at point (1214,70) because another element <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf"> obscures it
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: ElementClickInterceptedException
Check failure on line 0 in test-results/test.xml
github-actions / test-report-Object__firefox_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.firefox_TestAlertActions ► test_alert_action_label_entity
Failed test found in:
test-results/test.xml
Error:
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f75294460e0>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f75294460e0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f7527b075e0>
ucc_smartx_rest_helper = <pytest_splunk_addon_ui_smartx.base_test.RestHelper object at 0x7f75291bac20>
@pytest.mark.execute_enterprise_cloud_true
@pytest.mark.forwarder
def test_alert_action_label_entity(
self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper
):
"""Verifies the alert field labels"""
alert_page = AlertPage(ucc_smartx_selenium_helper, None)
> alert_page.alert_entity.open()
tests/ui/test_splunk_ta_example_addon_alert_actions.py:199:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f7527b3be20>
def open(self):
"""
Open the required page. Page(super) class opens the page by default.
"""
> self.add_alert.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/__init__.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.components.button.Button object at 0x7f7527ab5210>
def click(self):
"""
Click on the button
"""
> self.container.click()
/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/alert_actions/components/button.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="53370064bb7d47659dfd143e06ec56e6", element="9f187df7-bead-41de-b59f-ba4c7a551b98")>
def click(self):
"""Clicks the element."""
> self._execute(Command.CLICK_ELEMENT)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webelement.WebElement (session="53370064bb7d47659dfd143e06ec56e6", element="9f187df7-bead-41de-b59f-ba4c7a551b98")>
command = 'clickElement'
params = {'id': '9f187df7-bead-41de-b59f-ba4c7a551b98', 'sessionId': '53370064bb7d47659dfd143e06ec56e6'}
def _execute(self, command, params=None):
"""Executes a command against the underlying HTML element.
Args:
command: The name of the command to _execute as a string.
params: A dictionary of named parameters to send with the command.
Returns:
The command's JSON response loaded into a dictionary object.
"""
if not params:
params = {}
params['id'] = self._id
> return self._parent.execute(command, params)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webelement.py:633:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.webdriver.WebDriver (session="53370064bb7d47659dfd143e06ec56e6")>
driver_command = 'clickElement'
params = {'id': '9f187df7-bead-41de-b59f-ba4c7a551b98'}
def execute(self, driver_command, params=None):
"""
Sends a command to be executed by a command.CommandExecutor.
:Args:
- driver_command: The name of the command to execute as a string.
- params: A dictionary of named parameters to send with the command.
:Returns:
The command's JSON response loaded into a dictionary object.
"""
if self.session_id is not None:
if not params:
params = {'sessionId': self.session_id}
elif 'sessionId' not in params:
params['sessionId'] = self.session_id
params = self._wrap_value(params)
response = self.command_executor.execute(driver_command, params)
if response:
> self.error_handler.check_response(response)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:321:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x7f7527adbd60>
response = {'status': 400, 'value': '{"value": {"stacktrace": "RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8...=\\"ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf\\"> obscures it", "error": "element click intercepted"}}'}
def check_response(self, response):
"""
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 status is None or status == ErrorCode.SUCCESS:
return
value = None
message = response.get("message", "")
screen = response.get("screen", "")
stacktrace = None
if isinstance(status, int):
value_json = response.get('value', None)
if value_json and isinstance(value_json, basestring):
import json
try:
value = json.loads(value_json)
if len(value.keys()) == 1:
value = value['value']
status = value.get('error', None)
if status is None:
status = value["status"]
message = value["value"]
if not isinstance(message, basestring):
value = message
message = message.get('message')
else:
message = value.get('message', None)
except ValueError:
pass
exception_class = ErrorInResponseException
if status in ErrorCode.NO_SUCH_ELEMENT:
exception_class = NoSuchElementException
elif status in ErrorCode.NO_SUCH_FRAME:
exception_class = NoSuchFrameException
elif status in ErrorCode.NO_SUCH_WINDOW:
exception_class = NoSuchWindowException
elif status in ErrorCode.STALE_ELEMENT_REFERENCE:
exception_class = StaleElementReferenceException
elif status in ErrorCode.ELEMENT_NOT_VISIBLE:
exception_class = ElementNotVisibleException
elif status in ErrorCode.INVALID_ELEMENT_STATE:
exception_class = InvalidElementStateException
elif status in ErrorCode.INVALID_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR \
or status in ErrorCode.INVALID_XPATH_SELECTOR_RETURN_TYPER:
exception_class = InvalidSelectorException
elif status in ErrorCode.ELEMENT_IS_NOT_SELECTABLE:
exception_class = ElementNotSelectableException
elif status in ErrorCode.ELEMENT_NOT_INTERACTABLE:
exception_class = ElementNotInteractableException
elif status in ErrorCode.INVALID_COOKIE_DOMAIN:
exception_class = InvalidCookieDomainException
elif status in ErrorCode.UNABLE_TO_SET_COOKIE:
exception_class = UnableToSetCookieException
elif status in ErrorCode.TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.SCRIPT_TIMEOUT:
exception_class = TimeoutException
elif status in ErrorCode.UNKNOWN_ERROR:
exception_class = WebDriverException
elif status in ErrorCode.UNEXPECTED_ALERT_OPEN:
exception_class = UnexpectedAlertPresentException
elif status in ErrorCode.NO_ALERT_OPEN:
exception_class = NoAlertPresentException
elif status in ErrorCode.IME_NOT_AVAILABLE:
exception_class = ImeNotAvailableException
elif status in ErrorCode.IME_ENGINE_ACTIVATION_FAILED:
exception_class = ImeActivationFailedException
elif status in ErrorCode.MOVE_TARGET_OUT_OF_BOUNDS:
exception_class = MoveTargetOutOfBoundsException
elif status in ErrorCode.JAVASCRIPT_ERROR:
exception_class = JavascriptException
elif status in ErrorCode.SESSION_NOT_CREATED:
exception_class = SessionNotCreatedException
elif status in ErrorCode.INVALID_ARGUMENT:
exception_class = InvalidArgumentException
elif status in ErrorCode.NO_SUCH_COOKIE:
exception_class = NoSuchCookieException
elif status in ErrorCode.UNABLE_TO_CAPTURE_SCREEN:
exception_class = ScreenshotException
elif status in ErrorCode.ELEMENT_CLICK_INTERCEPTED:
exception_class = ElementClickInterceptedException
elif status in ErrorCode.INSECURE_CERTIFICATE:
exception_class = InsecureCertificateException
elif status in ErrorCode.INVALID_COORDINATES:
exception_class = InvalidCoordinatesException
elif status in ErrorCode.INVALID_SESSION_ID:
exception_class = InvalidSessionIdException
elif status in ErrorCode.UNKNOWN_METHOD:
exception_class = UnknownMethodException
else:
exception_class = WebDriverException
if value == '' or value is None:
value = response['value']
if isinstance(value, basestring):
if exception_class == ErrorInResponseException:
raise exception_class(response, value)
raise exception_class(value)
if message == "" and 'message' in value:
message = value['message']
screen = None
if 'screen' in value:
screen = value['screen']
stacktrace = None
if 'stackTrace' in value and value['stackTrace']:
stacktrace = []
try:
for frame in value['stackTrace']:
line = self._value_or_default(frame, 'lineNumber', '')
file = self._value_or_default(frame, 'fileName', '<anonymous>')
if line:
file = "%s:%s" % (file, line)
meth = self._value_or_default(frame, 'methodName', '<anonymous>')
if 'className' in frame:
meth = "%s.%s" % (frame['className'], meth)
msg = " at %s (%s)"
msg = msg % (meth, file)
stacktrace.append(msg)
except TypeError:
pass
if exception_class == ErrorInResponseException:
raise exception_class(response, message)
elif 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)
> raise exception_class(message, screen, stacktrace)
E selenium.common.exceptions.ElementClickInterceptedException: Message: Element <a class="btn new-alert-button" href="#"> is not clickable at point (1214,70) because another element <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf"> obscures it
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: ElementClickInterceptedException