chore: use poetry 1.4.2 in the CI (#382) #458
test-report-Object__chrome_test_splunk_ta_example_addon_alert_actions ❌
❌ test-results/test.xml
9 tests were completed in 478s with 0 passed, 9 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
pytest | 9❌ | 478s |
❌ pytest
tests.ui.test_splunk_ta_example_addon_alert_actions.chrome_TestAlertActions
❌ test_action_in_list
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53b0dcf640>
❌ test_dropdown_list
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af911ea0>
❌ test_account_functionality
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af912f50>
❌ test_checkbox
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af911210>
❌ test_single_select
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af911480>
❌ test_toggle
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af912080>
❌ test_alert_action_save
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af9110c0>
❌ test_alert_help_text_entity
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af9127d0>
❌ test_alert_action_label_entity
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af913eb0>
Annotations
Check failure on line 0 in test-results/test.xml
github-actions / test-report-Object__chrome_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.chrome_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 0x7f53b0dcf640>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53b0dcf640>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f53af56f640>
@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 0x7f53af56ee60>
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 0x7f53af5751b0>
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="cda4e9ca543a44aa8d4eb30b232f5779", element="18087E15BB1097D9E2A3B9C3F6ED4D8A_element_40")>
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="cda4e9ca543a44aa8d4eb30b232f5779", element="18087E15BB1097D9E2A3B9C3F6ED4D8A_element_40")>
command = 'clickElement'
params = {'id': '18087E15BB1097D9E2A3B9C3F6ED4D8A_element_40', 'sessionId': 'cda4e9ca543a44aa8d4eb30b232f5779'}
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="cda4e9ca543a44aa8d4eb30b232f5779")>
driver_command = 'clickElement'
params = {'id': '18087E15BB1097D9E2A3B9C3F6ED4D8A_element_40'}
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 0x7f53af56efe0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x00E237C3+48947]\\n\\t(No symbol) [0x00DB85...f\\" style=\\"opacity: 1;\\"></div>\\n (Session info: chrome=116.0.5845.97)", "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 click intercepted: Element <a href="#" class="btn new-alert-button">...</a> is not clickable at point (1214, 70). Other element would receive the click: <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf" style="opacity: 1;"></div>
E (Session info: chrome=116.0.5845.97)
/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__chrome_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.chrome_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 0x7f53af911ea0>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af911ea0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f53af7025f0>
@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 0x7f53af7021d0>
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 0x7f53af703f70>
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="88cac480ca4c410fb314dfb4b6137657", element="EAE3CA7AB5FCE62B481F0B746A02FFB8_element_45")>
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="88cac480ca4c410fb314dfb4b6137657", element="EAE3CA7AB5FCE62B481F0B746A02FFB8_element_45")>
command = 'clickElement'
params = {'id': 'EAE3CA7AB5FCE62B481F0B746A02FFB8_element_45', 'sessionId': '88cac480ca4c410fb314dfb4b6137657'}
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="88cac480ca4c410fb314dfb4b6137657")>
driver_command = 'clickElement'
params = {'id': 'EAE3CA7AB5FCE62B481F0B746A02FFB8_element_45'}
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 0x7f53af702410>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x005037C3+48947]\\n\\t(No symbol) [0x004985...f\\" style=\\"opacity: 1;\\"></div>\\n (Session info: chrome=116.0.5845.97)", "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 click intercepted: Element <a href="#" class="btn new-alert-button">...</a> is not clickable at point (1214, 70). Other element would receive the click: <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf" style="opacity: 1;"></div>
E (Session info: chrome=116.0.5845.97)
/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__chrome_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.chrome_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 0x7f53af912f50>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af912f50>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f53af3bb040>
@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 0x7f53af3bb790>
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 0x7f53af3b8460>
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="6a96a8f7aac74699a63a65884c407490", element="908E2BB846C258BA6D578682298FF3AC_element_46")>
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="6a96a8f7aac74699a63a65884c407490", element="908E2BB846C258BA6D578682298FF3AC_element_46")>
command = 'clickElement'
params = {'id': '908E2BB846C258BA6D578682298FF3AC_element_46', 'sessionId': '6a96a8f7aac74699a63a65884c407490'}
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="6a96a8f7aac74699a63a65884c407490")>
driver_command = 'clickElement'
params = {'id': '908E2BB846C258BA6D578682298FF3AC_element_46'}
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 0x7f53af3bb6a0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x008E37C3+48947]\\n\\t(No symbol) [0x008785...f\\" style=\\"opacity: 1;\\"></div>\\n (Session info: chrome=116.0.5845.97)", "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 click intercepted: Element <a href="#" class="btn new-alert-button">...</a> is not clickable at point (1214, 70). Other element would receive the click: <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf" style="opacity: 1;"></div>
E (Session info: chrome=116.0.5845.97)
/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__chrome_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.chrome_TestAlertActions ► test_checkbox
Failed test found in:
test-results/test.xml
Error:
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af911210>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af911210>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f53af7018d0>
@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 0x7f53af701000>
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 0x7f53af3cbca0>
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="00d82204ea824826b5049d691778b0f1", element="D1E6430B38C4D8606B8500F476DCC800_element_44")>
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="00d82204ea824826b5049d691778b0f1", element="D1E6430B38C4D8606B8500F476DCC800_element_44")>
command = 'clickElement'
params = {'id': 'D1E6430B38C4D8606B8500F476DCC800_element_44', 'sessionId': '00d82204ea824826b5049d691778b0f1'}
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="00d82204ea824826b5049d691778b0f1")>
driver_command = 'clickElement'
params = {'id': 'D1E6430B38C4D8606B8500F476DCC800_element_44'}
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 0x7f53af701750>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x011737C3+48947]\\n\\t(No symbol) [0x011085...f\\" style=\\"opacity: 1;\\"></div>\\n (Session info: chrome=116.0.5845.97)", "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 click intercepted: Element <a href="#" class="btn new-alert-button">...</a> is not clickable at point (1214, 70). Other element would receive the click: <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf" style="opacity: 1;"></div>
E (Session info: chrome=116.0.5845.97)
/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__chrome_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.chrome_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 0x7f53af911480>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af911480>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f53af3bbee0>
@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 0x7f53af3b8880>
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 0x7f53af393700>
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="9a504266dc6c4eca902206a828f7aa51", element="CAABD98D51D0583891E28723F0C43720_element_44")>
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="9a504266dc6c4eca902206a828f7aa51", element="CAABD98D51D0583891E28723F0C43720_element_44")>
command = 'clickElement'
params = {'id': 'CAABD98D51D0583891E28723F0C43720_element_44', 'sessionId': '9a504266dc6c4eca902206a828f7aa51'}
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="9a504266dc6c4eca902206a828f7aa51")>
driver_command = 'clickElement'
params = {'id': 'CAABD98D51D0583891E28723F0C43720_element_44'}
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 0x7f53af3bad10>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x008637C3+48947]\\n\\t(No symbol) [0x007F85...f\\" style=\\"opacity: 1;\\"></div>\\n (Session info: chrome=116.0.5845.97)", "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 click intercepted: Element <a href="#" class="btn new-alert-button">...</a> is not clickable at point (1214, 70). Other element would receive the click: <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf" style="opacity: 1;"></div>
E (Session info: chrome=116.0.5845.97)
/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__chrome_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.chrome_TestAlertActions ► test_toggle
Failed test found in:
test-results/test.xml
Error:
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af912080>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af912080>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f53af685780>
@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 0x7f53af684250>
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 0x7f53af687850>
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="00d87ef4ebae43d8ae1071f5b95e6d65", element="2CA5542963ED38BE2D98C00088148E31_element_44")>
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="00d87ef4ebae43d8ae1071f5b95e6d65", element="2CA5542963ED38BE2D98C00088148E31_element_44")>
command = 'clickElement'
params = {'id': '2CA5542963ED38BE2D98C00088148E31_element_44', 'sessionId': '00d87ef4ebae43d8ae1071f5b95e6d65'}
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="00d87ef4ebae43d8ae1071f5b95e6d65")>
driver_command = 'clickElement'
params = {'id': '2CA5542963ED38BE2D98C00088148E31_element_44'}
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 0x7f53af687dc0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x00F737C3+48947]\\n\\t(No symbol) [0x00F085...f\\" style=\\"opacity: 1;\\"></div>\\n (Session info: chrome=116.0.5845.97)", "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 click intercepted: Element <a href="#" class="btn new-alert-button">...</a> is not clickable at point (1214, 70). Other element would receive the click: <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf" style="opacity: 1;"></div>
E (Session info: chrome=116.0.5845.97)
/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__chrome_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.chrome_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 0x7f53af9110c0>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af9110c0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f53af6c61d0>
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 0x7f53af701300>
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 0x7f53af7032b0>
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="30cb75ab2f634ff69531707f312dfca1", element="DA86F32447856312AE04240F883B95F8_element_45")>
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="30cb75ab2f634ff69531707f312dfca1", element="DA86F32447856312AE04240F883B95F8_element_45")>
command = 'clickElement'
params = {'id': 'DA86F32447856312AE04240F883B95F8_element_45', 'sessionId': '30cb75ab2f634ff69531707f312dfca1'}
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="30cb75ab2f634ff69531707f312dfca1")>
driver_command = 'clickElement'
params = {'id': 'DA86F32447856312AE04240F883B95F8_element_45'}
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 0x7f53af6c7460>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x010437C3+48947]\\n\\t(No symbol) [0x00FD85...f\\" style=\\"opacity: 1;\\"></div>\\n (Session info: chrome=116.0.5845.97)", "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 click intercepted: Element <a href="#" class="btn new-alert-button">...</a> is not clickable at point (1214, 70). Other element would receive the click: <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf" style="opacity: 1;"></div>
E (Session info: chrome=116.0.5845.97)
/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__chrome_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.chrome_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 0x7f53af9127d0>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af9127d0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f53af36a140>
@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 0x7f53af368190>
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 0x7f53af56e2c0>
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="3f8928c96f3c4f0a958fa1bba2db13ec", element="62EBE5EA711C90439EA7365A6B9B2DA8_element_46")>
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="3f8928c96f3c4f0a958fa1bba2db13ec", element="62EBE5EA711C90439EA7365A6B9B2DA8_element_46")>
command = 'clickElement'
params = {'id': '62EBE5EA711C90439EA7365A6B9B2DA8_element_46', 'sessionId': '3f8928c96f3c4f0a958fa1bba2db13ec'}
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="3f8928c96f3c4f0a958fa1bba2db13ec")>
driver_command = 'clickElement'
params = {'id': '62EBE5EA711C90439EA7365A6B9B2DA8_element_46'}
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 0x7f53af369de0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x009937C3+48947]\\n\\t(No symbol) [0x009285...f\\" style=\\"opacity: 1;\\"></div>\\n (Session info: chrome=116.0.5845.97)", "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 click intercepted: Element <a href="#" class="btn new-alert-button">...</a> is not clickable at point (1214, 70). Other element would receive the click: <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf" style="opacity: 1;"></div>
E (Session info: chrome=116.0.5845.97)
/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__chrome_test_splunk_ta_example_addon_alert_actions
pytest ► tests.ui.test_splunk_ta_example_addon_alert_actions.chrome_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 0x7f53af913eb0>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f53af913eb0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f53af36aa10>
ucc_smartx_rest_helper = <pytest_splunk_addon_ui_smartx.base_test.RestHelper object at 0x7f53af576c80>
@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 0x7f53af48cfd0>
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 0x7f53af48e680>
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="9a413295182348d7a996ec06cb74fa7f", element="B4FBDF00F6BC7243105953E8E014F889_element_49")>
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="9a413295182348d7a996ec06cb74fa7f", element="B4FBDF00F6BC7243105953E8E014F889_element_49")>
command = 'clickElement'
params = {'id': 'B4FBDF00F6BC7243105953E8E014F889_element_49', 'sessionId': '9a413295182348d7a996ec06cb74fa7f'}
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="9a413295182348d7a996ec06cb74fa7f")>
driver_command = 'clickElement'
params = {'id': 'B4FBDF00F6BC7243105953E8E014F889_element_49'}
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 0x7f53af48e2f0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x007D37C3+48947]\\n\\t(No symbol) [0x007685...f\\" style=\\"opacity: 1;\\"></div>\\n (Session info: chrome=116.0.5845.97)", "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 click intercepted: Element <a href="#" class="btn new-alert-button">...</a> is not clickable at point (1214, 70). Other element would receive the click: <div class="ModalLayerStyles__StyledClickAwayOverlay-bj2ql8-0 btlxWf" style="opacity: 1;"></div>
E (Session info: chrome=116.0.5845.97)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: ElementClickInterceptedException