feat(code): added clear_text function #391
test-report-Object__chrome_test_splunk_ta_example_addon_alert_actions ❌
❌ test-results/test.xml
9 tests were completed in 927s with 0 passed, 9 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
pytest | 9❌ | 927s |
❌ 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 0x7f68faf69de0>
❌ test_dropdown_list
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf69d80>
❌ test_account_functionality
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf6a4d0>
❌ test_checkbox
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf69f90>
❌ test_single_select
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf68340>
❌ test_toggle
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf69b10>
❌ test_alert_action_save
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf69870>
❌ test_alert_help_text_entity
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf69510>
❌ test_alert_action_label_entity
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf691e0>
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 0x7f68faf69de0>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf69de0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f68faf9ed70>
@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:66:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f68faf9c070>
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 0x7f68fae11f30>
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="8d3c3844506041298c617c33b50f9e1f", element="5B083CE53F42787735FB1F50C7FC6827_element_66")>
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="8d3c3844506041298c617c33b50f9e1f", element="5B083CE53F42787735FB1F50C7FC6827_element_66")>
command = 'clickElement'
params = {'id': '5B083CE53F42787735FB1F50C7FC6827_element_66', 'sessionId': '8d3c3844506041298c617c33b50f9e1f'}
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="8d3c3844506041298c617c33b50f9e1f")>
driver_command = 'clickElement'
params = {'id': '5B083CE53F42787735FB1F50C7FC6827_element_66'}
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 0x7f68faf9ece0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x0097CE43+45171]\\n\\t(No symbol) [0x009090...\\"modal-backdrop fade in\\"></div>\\n (Session info: chrome=117.0.5938.63)", "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, 71). Other element would receive the click: <div class="modal-backdrop fade in"></div>
E (Session info: chrome=117.0.5938.63)
/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 0x7f68faf69d80>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf69d80>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f68faf9d570>
@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:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f68faf9dc00>
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 0x7f68fad06b60>
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="b864db63f1b74a708c8b80ce9173a5fd", element="6D7976049E4F56E9DB4681D4004E2A32_element_60")>
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="b864db63f1b74a708c8b80ce9173a5fd", element="6D7976049E4F56E9DB4681D4004E2A32_element_60")>
command = 'clickElement'
params = {'id': '6D7976049E4F56E9DB4681D4004E2A32_element_60', 'sessionId': 'b864db63f1b74a708c8b80ce9173a5fd'}
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="b864db63f1b74a708c8b80ce9173a5fd")>
driver_command = 'clickElement'
params = {'id': '6D7976049E4F56E9DB4681D4004E2A32_element_60'}
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 0x7f68faf9d2d0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x006ECE43+45171]\\n\\t(No symbol) [0x006790...\\"modal-backdrop fade in\\"></div>\\n (Session info: chrome=117.0.5938.63)", "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, 71). Other element would receive the click: <div class="modal-backdrop fade in"></div>
E (Session info: chrome=117.0.5938.63)
/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 0x7f68faf6a4d0>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf6a4d0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f68faf9f940>
@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:90:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f68fad72590>
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 0x7f68fad72ef0>
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="40f0d6b0f484436aa55ea98a631b5b23", element="57A3FD21D3D60BF8DB1320485961FBEC_element_55")>
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="40f0d6b0f484436aa55ea98a631b5b23", element="57A3FD21D3D60BF8DB1320485961FBEC_element_55")>
command = 'clickElement'
params = {'id': '57A3FD21D3D60BF8DB1320485961FBEC_element_55', 'sessionId': '40f0d6b0f484436aa55ea98a631b5b23'}
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="40f0d6b0f484436aa55ea98a631b5b23")>
driver_command = 'clickElement'
params = {'id': '57A3FD21D3D60BF8DB1320485961FBEC_element_55'}
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 0x7f68faf9d270>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x002ACE43+45171]\\n\\t(No symbol) [0x002390...\\"modal-backdrop fade in\\"></div>\\n (Session info: chrome=117.0.5938.63)", "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, 71). Other element would receive the click: <div class="modal-backdrop fade in"></div>
E (Session info: chrome=117.0.5938.63)
/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 0x7f68faf69f90>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf69f90>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f68fad059c0>
@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:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f68fad06e90>
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 0x7f68fad06200>
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="e166ea34672a43728c2625256e755547", element="504B88914D68DF5BA5EECC7F8BB10D0E_element_62")>
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="e166ea34672a43728c2625256e755547", element="504B88914D68DF5BA5EECC7F8BB10D0E_element_62")>
command = 'clickElement'
params = {'id': '504B88914D68DF5BA5EECC7F8BB10D0E_element_62', 'sessionId': 'e166ea34672a43728c2625256e755547'}
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="e166ea34672a43728c2625256e755547")>
driver_command = 'clickElement'
params = {'id': '504B88914D68DF5BA5EECC7F8BB10D0E_element_62'}
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 0x7f68fad041c0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x00A9CE43+45171]\\n\\t(No symbol) [0x00A290...\\"modal-backdrop fade in\\"></div>\\n (Session info: chrome=117.0.5938.63)", "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, 71). Other element would receive the click: <div class="modal-backdrop fade in"></div>
E (Session info: chrome=117.0.5938.63)
/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 0x7f68faf68340>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf68340>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f68fad070d0>
@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:121:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f68faea6fe0>
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 0x7f68faea6d40>
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="f2b70ccab25f41738bdda09d009a7b4e", element="945640D098BCF4C54DE8831069A5A28B_element_70")>
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="f2b70ccab25f41738bdda09d009a7b4e", element="945640D098BCF4C54DE8831069A5A28B_element_70")>
command = 'clickElement'
params = {'id': '945640D098BCF4C54DE8831069A5A28B_element_70', 'sessionId': 'f2b70ccab25f41738bdda09d009a7b4e'}
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="f2b70ccab25f41738bdda09d009a7b4e")>
driver_command = 'clickElement'
params = {'id': '945640D098BCF4C54DE8831069A5A28B_element_70'}
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 0x7f68fad05030>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x00E7CE43+45171]\\n\\t(No symbol) [0x00E090...\\"modal-backdrop fade in\\"></div>\\n (Session info: chrome=117.0.5938.63)", "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, 71). Other element would receive the click: <div class="modal-backdrop fade in"></div>
E (Session info: chrome=117.0.5938.63)
/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 0x7f68faf69b10>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf69b10>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f68faf9de70>
@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:135:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f68faf9f0a0>
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 0x7f68faccb0a0>
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="d8188d8bef9c40bda8a18dbfc84ae287", element="FB6734E8AE7E158B56DE6CA5F5C2EF1E_element_56")>
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="d8188d8bef9c40bda8a18dbfc84ae287", element="FB6734E8AE7E158B56DE6CA5F5C2EF1E_element_56")>
command = 'clickElement'
params = {'id': 'FB6734E8AE7E158B56DE6CA5F5C2EF1E_element_56', 'sessionId': 'd8188d8bef9c40bda8a18dbfc84ae287'}
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="d8188d8bef9c40bda8a18dbfc84ae287")>
driver_command = 'clickElement'
params = {'id': 'FB6734E8AE7E158B56DE6CA5F5C2EF1E_element_56'}
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 0x7f68faf9e980>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x0070CE43+45171]\\n\\t(No symbol) [0x006990...\\"modal-backdrop fade in\\"></div>\\n (Session info: chrome=117.0.5938.63)", "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, 71). Other element would receive the click: <div class="modal-backdrop fade in"></div>
E (Session info: chrome=117.0.5938.63)
/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 0x7f68faf69870>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf69870>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f68faed9db0>
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:149:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f68faed8760>
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 0x7f68faedb760>
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="041ed1f2d68d4c86a113df1e17332e77", element="B42AC3DB6CE962B960096218F0AF1190_element_56")>
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="041ed1f2d68d4c86a113df1e17332e77", element="B42AC3DB6CE962B960096218F0AF1190_element_56")>
command = 'clickElement'
params = {'id': 'B42AC3DB6CE962B960096218F0AF1190_element_56', 'sessionId': '041ed1f2d68d4c86a113df1e17332e77'}
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="041ed1f2d68d4c86a113df1e17332e77")>
driver_command = 'clickElement'
params = {'id': 'B42AC3DB6CE962B960096218F0AF1190_element_56'}
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 0x7f68faeda1a0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x0041CE43+45171]\\n\\t(No symbol) [0x003A90...\\"modal-backdrop fade in\\"></div>\\n (Session info: chrome=117.0.5938.63)", "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, 71). Other element would receive the click: <div class="modal-backdrop fade in"></div>
E (Session info: chrome=117.0.5938.63)
/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 0x7f68faf69510>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf69510>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f68faed90f0>
@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:173:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f68faedaaa0>
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 0x7f68faceefb0>
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="74362144d3674c0cb535bfcb05b9ab64", element="399D9E693C01D96277DBE0AEED89E35C_element_55")>
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="74362144d3674c0cb535bfcb05b9ab64", element="399D9E693C01D96277DBE0AEED89E35C_element_55")>
command = 'clickElement'
params = {'id': '399D9E693C01D96277DBE0AEED89E35C_element_55', 'sessionId': '74362144d3674c0cb535bfcb05b9ab64'}
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="74362144d3674c0cb535bfcb05b9ab64")>
driver_command = 'clickElement'
params = {'id': '399D9E693C01D96277DBE0AEED89E35C_element_55'}
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 0x7f68faed8d90>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x0072CE43+45171]\\n\\t(No symbol) [0x006B90...\\"modal-backdrop fade in\\"></div>\\n (Session info: chrome=117.0.5938.63)", "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, 71). Other element would receive the click: <div class="modal-backdrop fade in"></div>
E (Session info: chrome=117.0.5938.63)
/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 0x7f68faf691e0>
Raw output
self = <ui.test_splunk_ta_example_addon_alert_actions.TestAlertActions object at 0x7f68faf691e0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f68faf18dc0>
ucc_smartx_rest_helper = <pytest_splunk_addon_ui_smartx.base_test.RestHelper object at 0x7f68faf9f100>
@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:202:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pytest_splunk_addon_ui_smartx.alert_actions.AlertEntity object at 0x7f68faf1a1d0>
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 0x7f68fad704f0>
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="1a062c6286a0473d8ffad422c109d705", element="4ADA41735C4CC9EA1C1E712D6E8FE1DE_element_64")>
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="1a062c6286a0473d8ffad422c109d705", element="4ADA41735C4CC9EA1C1E712D6E8FE1DE_element_64")>
command = 'clickElement'
params = {'id': '4ADA41735C4CC9EA1C1E712D6E8FE1DE_element_64', 'sessionId': '1a062c6286a0473d8ffad422c109d705'}
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="1a062c6286a0473d8ffad422c109d705")>
driver_command = 'clickElement'
params = {'id': '4ADA41735C4CC9EA1C1E712D6E8FE1DE_element_64'}
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 0x7f68faf1b8b0>
response = {'status': 400, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x002ECE43+45171]\\n\\t(No symbol) [0x002790...\\"modal-backdrop fade in\\"></div>\\n (Session info: chrome=117.0.5938.63)", "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, 71). Other element would receive the click: <div class="modal-backdrop fade in"></div>
E (Session info: chrome=117.0.5938.63)
/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: ElementClickInterceptedException