Skip to content

ci: split UI tests for the input page in 3 groups #811

ci: split UI tests for the input page in 3 groups

ci: split UI tests for the input page in 3 groups #811

GitHub Actions / test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1 failed Sep 28, 2023 in 1s

test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1 ❌

Tests failed

❌ test-results/test.xml

59 tests were completed in 3508s with 0 passed, 59 failed and 0 skipped.

Test suite Passed Failed Skipped Time
pytest 59❌ 3508s

❌ pytest

tests.ui.test_splunk_ta_example_addon_input_1.chrome_TestInput
  ❌ test_example_input_one_required_field_name
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_required_field_name>>
  ❌ test_example_input_one_valid_length_name
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_valid_length_name>>
  ❌ test_example_input_one_valid_input_name
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_valid_input_name>>
  ❌ test_example_input_one_list_single_select_group_test
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_list_single_select_group_test>>
  ❌ test_example_input_one_select_value_single_select_group_test
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_select_value_single_select_group_test>>
  ❌ test_example_input_one_search_value_single_select_group_test
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_search_value_single_select_group_test>>
  ❌ test_example_input_one_default_value_multiple_select_test
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_default_value_multiple_select_test>>
  ❌ test_example_input_one_list_multiple_select_test
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_list_multiple_select_test>>
  ❌ test_example_input_one_select_value_multiple_select_test
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_select_value_multiple_select_test>>
  ❌ test_example_input_one_select_multiple_values_multiple_select_test
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_select_multiple_values_multiple_select_test>>
  ❌ test_example_input_one_deselect_multiple_select_test
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_deselect_multiple_select_test>>
  ❌ test_example_input_one_search_value_multiple_select_test
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_search_value_multiple_select_test>>
  ❌ test_example_input_one_default_value_example_checkbox
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_default_value_example_checkbox>>
  ❌ test_example_input_one_unchecked_example_checkbox
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_unchecked_example_checkbox>>
  ❌ test_example_input_one_checked_example_checkbox
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_checked_example_checkbox>>
  ❌ test_example_input_one_default_value_example_radio
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_default_value_example_radio>>
  ❌ test_example_input_one_select_value_example_radio
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_select_value_example_radio>>
  ❌ test_example_input_one_required_field_interval
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_required_field_interval>>
  ❌ test_example_input_one_valid_input_interval
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_valid_input_interval>>
  ❌ test_example_input_one_required_field_index
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_required_field_index>>
  ❌ test_example_input_one_default_value_index
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_default_value_index>>
  ❌ test_example_input_one_required_field_example_account
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_required_field_example_account>>
  ❌ test_example_input_one_required_field_object
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_required_field_object>>
  ❌ test_example_input_one_required_field_object_fields
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_required_field_object_fields>>
  ❌ test_example_input_one_required_field_order_by
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_required_field_order_by>>
  ❌ test_example_input_one_default_value_order_by
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_default_value_order_by>>
  ❌ test_example_input_one_fields_label_entity
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_fields_label_entity>>
  ❌ test_example_input_two_fields_label_entity
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_two_fields_label_entity>>
  ❌ test_example_input_one_fields_placeholder_value
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_fields_placeholder_value>>
  ❌ test_example_input_two_fields_placeholder_value
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_two_fields_placeholder_value>>
  ❌ test_example_input_one_help_text_entity
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_help_text_entity>>
  ❌ test_example_input_one_valid_input_query_start_date
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_valid_input_query_start_date>>
  ❌ test_example_input_one_default_value_limit
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_default_value_limit>>
  ❌ test_example_input_one_help_link
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_help_link>>
  ❌ test_example_input_one_add_frontend_validation
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_add_frontend_validation>>
  ❌ test_example_input_one_add_backend_validation
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_add_backend_validation>>
  ❌ test_example_input_one_edit_uneditable_field_name
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_edit_uneditable_field_name>>
  ❌ test_example_input_one_edit_frontend_validation
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_edit_frontend_validation>>
  ❌ test_example_input_one_edit_backend_validation
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_edit_backend_validation>>
  ❌ test_example_input_one_clone_default_values
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_clone_default_values>>
  ❌ test_example_input_one_clone_frontend_validation
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_clone_frontend_validation>>
  ❌ test_example_input_one_clone_backend_validation
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_clone_backend_validation>>
  ❌ test_example_input_one_delete_row_frontend_validation
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_delete_row_frontend_validation>>
  ❌ test_example_input_one_delete_row_backend_validation
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_delete_row_backend_validation>>
  ❌ test_example_input_one_add_close_entity
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_add_close_entity>>
  ❌ test_example_input_one_edit_close_entity
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_edit_close_entity>>
  ❌ test_example_input_one_clone_close_entity
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_clone_close_entity>>
  ❌ test_example_input_one_delete_close_entity
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_delete_close_entity>>
  ❌ test_example_input_one_add_cancel_entity
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_add_cancel_entity>>
  ❌ test_example_input_one_edit_cancel_entity
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_edit_cancel_entity>>
  ❌ test_example_input_one_clone_cancel_entity
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_clone_cancel_entity>>
  ❌ test_example_input_one_delete_cancel_entity
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_delete_cancel_entity>>
  ❌ test_example_input_one_add_duplicate_names
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_add_duplicate_names>>
  ❌ test_example_input_one_clone_duplicate_names
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_clone_duplicate_names>>
  ❌ test_example_input_one_add_valid_title
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_add_valid_title>>
  ❌ test_example_input_one_edit_valid_title
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_edit_valid_title>>
  ❌ test_example_input_one_clone_valid_title
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_clone_valid_title>>
  ❌ test_example_input_one_delete_valid_title
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_delete_valid_title>>
  ❌ test_example_input_one_delete_valid_prompt_message
	request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_delete_valid_prompt_message>>

Annotations

Check failure on line 0 in test-results/test.xml

See this annotation in the file changed.

@github-actions github-actions / test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1

pytest ► tests.ui.test_splunk_ta_example_addon_input_1.chrome_TestInput ► test_example_input_one_required_field_name

Failed test found in:
  test-results/test.xml
Error:
  request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_required_field_name>>
Raw output
request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_required_field_name>>

    @pytest.fixture(scope="function", autouse=True)
    def ucc_smartx_selenium_wrapper(request):
        """
        Calls ucc_smartx_selenium_helper fixture
        """
        if "ucc_smartx_selenium_helper" in request.fixturenames:
>           request.node.selenium_helper = request.getfixturevalue(
                "ucc_smartx_selenium_helper"
            )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:254: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_required_field_name>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
                selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )
                break
            except Exception as e:
                last_exc = e
                LOGGER.warning(
                    "Failed to configure the browser or login to Splunk instance for - Try={} \nTRACEBACK::{}".format(
                        try_number, traceback.format_exc()
                    )
                )
        else:
            LOGGER.error(
                "Could not connect to Browser or login to Splunk instance. Please check the logs for detailed error of each retry"
            )
>           raise (last_exc)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_required_field_name>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
>               selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339a21ea0>
browser = 'chrome', browser_version = 'latest'
splunk_web_url = 'http://splunk:8000/'
splunk_mgmt_url = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')
debug = False, cred = ('admin', 'Chang3d!'), headless = False
test_case = 'chrome_test_example_input_one_required_field_name'

    def __init__(
        self,
        browser,
        browser_version,
        splunk_web_url,
        splunk_mgmt_url,
        debug=False,
        cred=("admin", "Chang3d!"),
        headless=False,
        test_case=None,
    ):
        self.splunk_web_url = splunk_web_url
        self.splunk_mgmt_url = splunk_mgmt_url
        self.cred = cred
        self.test_case = test_case
        self.skip_saucelab_job = False
    
        if "grid" in browser:
            self.skip_saucelab_job = True
            debug = True
    
        if not debug:
            # Using Saucelabs
            self.init_sauce_env_variables()
    
        try:
            if browser == "firefox":
                if debug:
                    self.browser = webdriver.Firefox(
                        firefox_options=self.get_local_firefox_opts(headless),
                        log_path="selenium.log",
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_firefox_opts(
                            browser_version
                        ),
                    )
    
            elif browser == "chrome":
                if debug:
                    self.browser = webdriver.Chrome(
                        chrome_options=self.get_local_chrome_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_chrome_opts(
                            browser_version
                        ),
                    )
    
            # selenium local stack
            elif browser == "chrome_grid":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://chrome-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_grid":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://firefox-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
            # kubernetes selenium
            elif browser == "chrome_k8s":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_k8s":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
    
            elif browser == "edge":
                if debug:
                    self.browser = Edge(
                        executable_path="msedgedriver",
                        desired_capabilities=self.get_local_edge_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    command_executor = EdgeRemoteConnection(
                        "https://ondemand.saucelabs.com:443/wd/hub"
                    )
                    options = EdgeOptions()
                    options.use_chromium = True
                    self.browser = webdriver.Remote(
                        command_executor=command_executor,
                        options=options,
                        desired_capabilities=self.get_sauce_edge_opts(browser_version),
                    )
    
            elif browser == "IE":
                if debug:
                    self.browser = webdriver.Ie(capabilities=self.get_local_ie_opts())
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_ie_opts(browser_version),
                    )
            elif browser == "safari":
                if debug:
                    self.browser = webdriver.Safari()
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_safari_opts(
                            browser_version
                        ),
                    )
            else:
                raise Exception(
                    "No valid browser found.! expected=[firefox, chrome, safari], got={}".format(
                        browser
                    )
                )
        except Exception as e:
            raise e
    
        try:
            self.browser_session = self.browser.session_id
>           self.login_to_splunk(*self.cred)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:207: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339a21ea0>
cred = ('admin', 'Chang3d!')

    def login_to_splunk(self, *cred):
        try:
>           login_page = LoginPage(self)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339a20490>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339a21ea0>

    def __init__(self, ucc_smartx_selenium_helper):
        """
        :param ucc_smartx_selenium_helper: Fixture with selenium driver, urls(web, mgmt) and session key
        """
    
>       super().__init__(ucc_smartx_selenium_helper, ucc_smartx_rest_helper=None)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/login.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339a20490>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339a21ea0>
ucc_smartx_rest_helper = None, open_page = True

    def __init__(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, open_page=True
    ):
        """
        :param ucc_smartx_selenium_helper: The selenium webdriver
        :param ucc_smartx_rest_helper: Splunk web & management url. {"web": , "mgmt": }
        """
        if ucc_smartx_selenium_helper:
            self.browser = ucc_smartx_selenium_helper.browser
            self.splunk_web_url = ucc_smartx_selenium_helper.splunk_web_url
            if open_page:
>               self.open()

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339a20490>

    def open(self):
        """
        Abstract Method. Open the page
        """
>       self.browser.get(self.splunk_web_url)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="d8c07ef4126f410487245926c7051720")>
url = 'http://splunk:8000/'

    def get(self, url):
        """
        Loads a web page in the current browser session.
        """
>       self.execute(Command.GET, {'url': url})

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="d8c07ef4126f410487245926c7051720")>
driver_command = 'get', params = {'url': 'http://splunk:8000/'}

    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 0x7f2339a23430>
response = {'status': 500, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x00EFCE43+45171]\\n\\t(No symbol) [0x00E890...ge": "unknown error: net::ERR_NAME_NOT_RESOLVED\\n  (Session info: chrome=117.0.5938.63)", "error": "unknown error"}}'}

    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.WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED
E         (Session info: chrome=117.0.5938.63)

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException

Check failure on line 0 in test-results/test.xml

See this annotation in the file changed.

@github-actions github-actions / test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1

pytest ► tests.ui.test_splunk_ta_example_addon_input_1.chrome_TestInput ► test_example_input_one_valid_length_name

Failed test found in:
  test-results/test.xml
Error:
  request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_valid_length_name>>
Raw output
request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_valid_length_name>>

    @pytest.fixture(scope="function", autouse=True)
    def ucc_smartx_selenium_wrapper(request):
        """
        Calls ucc_smartx_selenium_helper fixture
        """
        if "ucc_smartx_selenium_helper" in request.fixturenames:
>           request.node.selenium_helper = request.getfixturevalue(
                "ucc_smartx_selenium_helper"
            )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:254: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_valid_length_name>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
                selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )
                break
            except Exception as e:
                last_exc = e
                LOGGER.warning(
                    "Failed to configure the browser or login to Splunk instance for - Try={} \nTRACEBACK::{}".format(
                        try_number, traceback.format_exc()
                    )
                )
        else:
            LOGGER.error(
                "Could not connect to Browser or login to Splunk instance. Please check the logs for detailed error of each retry"
            )
>           raise (last_exc)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_valid_length_name>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
>               selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339983b80>
browser = 'chrome', browser_version = 'latest'
splunk_web_url = 'http://splunk:8000/'
splunk_mgmt_url = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')
debug = False, cred = ('admin', 'Chang3d!'), headless = False
test_case = 'chrome_test_example_input_one_valid_length_name'

    def __init__(
        self,
        browser,
        browser_version,
        splunk_web_url,
        splunk_mgmt_url,
        debug=False,
        cred=("admin", "Chang3d!"),
        headless=False,
        test_case=None,
    ):
        self.splunk_web_url = splunk_web_url
        self.splunk_mgmt_url = splunk_mgmt_url
        self.cred = cred
        self.test_case = test_case
        self.skip_saucelab_job = False
    
        if "grid" in browser:
            self.skip_saucelab_job = True
            debug = True
    
        if not debug:
            # Using Saucelabs
            self.init_sauce_env_variables()
    
        try:
            if browser == "firefox":
                if debug:
                    self.browser = webdriver.Firefox(
                        firefox_options=self.get_local_firefox_opts(headless),
                        log_path="selenium.log",
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_firefox_opts(
                            browser_version
                        ),
                    )
    
            elif browser == "chrome":
                if debug:
                    self.browser = webdriver.Chrome(
                        chrome_options=self.get_local_chrome_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_chrome_opts(
                            browser_version
                        ),
                    )
    
            # selenium local stack
            elif browser == "chrome_grid":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://chrome-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_grid":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://firefox-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
            # kubernetes selenium
            elif browser == "chrome_k8s":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_k8s":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
    
            elif browser == "edge":
                if debug:
                    self.browser = Edge(
                        executable_path="msedgedriver",
                        desired_capabilities=self.get_local_edge_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    command_executor = EdgeRemoteConnection(
                        "https://ondemand.saucelabs.com:443/wd/hub"
                    )
                    options = EdgeOptions()
                    options.use_chromium = True
                    self.browser = webdriver.Remote(
                        command_executor=command_executor,
                        options=options,
                        desired_capabilities=self.get_sauce_edge_opts(browser_version),
                    )
    
            elif browser == "IE":
                if debug:
                    self.browser = webdriver.Ie(capabilities=self.get_local_ie_opts())
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_ie_opts(browser_version),
                    )
            elif browser == "safari":
                if debug:
                    self.browser = webdriver.Safari()
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_safari_opts(
                            browser_version
                        ),
                    )
            else:
                raise Exception(
                    "No valid browser found.! expected=[firefox, chrome, safari], got={}".format(
                        browser
                    )
                )
        except Exception as e:
            raise e
    
        try:
            self.browser_session = self.browser.session_id
>           self.login_to_splunk(*self.cred)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:207: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339983b80>
cred = ('admin', 'Chang3d!')

    def login_to_splunk(self, *cred):
        try:
>           login_page = LoginPage(self)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339982020>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339983b80>

    def __init__(self, ucc_smartx_selenium_helper):
        """
        :param ucc_smartx_selenium_helper: Fixture with selenium driver, urls(web, mgmt) and session key
        """
    
>       super().__init__(ucc_smartx_selenium_helper, ucc_smartx_rest_helper=None)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/login.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339982020>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339983b80>
ucc_smartx_rest_helper = None, open_page = True

    def __init__(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, open_page=True
    ):
        """
        :param ucc_smartx_selenium_helper: The selenium webdriver
        :param ucc_smartx_rest_helper: Splunk web & management url. {"web": , "mgmt": }
        """
        if ucc_smartx_selenium_helper:
            self.browser = ucc_smartx_selenium_helper.browser
            self.splunk_web_url = ucc_smartx_selenium_helper.splunk_web_url
            if open_page:
>               self.open()

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339982020>

    def open(self):
        """
        Abstract Method. Open the page
        """
>       self.browser.get(self.splunk_web_url)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="911185c2e0e042d49e68056a581201c2")>
url = 'http://splunk:8000/'

    def get(self, url):
        """
        Loads a web page in the current browser session.
        """
>       self.execute(Command.GET, {'url': url})

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="911185c2e0e042d49e68056a581201c2")>
driver_command = 'get', params = {'url': 'http://splunk:8000/'}

    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 0x7f2339982800>
response = {'status': 500, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x00E9CE43+45171]\\n\\t(No symbol) [0x00E290...ge": "unknown error: net::ERR_NAME_NOT_RESOLVED\\n  (Session info: chrome=117.0.5938.63)", "error": "unknown error"}}'}

    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.WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED
E         (Session info: chrome=117.0.5938.63)

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException

Check failure on line 0 in test-results/test.xml

See this annotation in the file changed.

@github-actions github-actions / test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1

pytest ► tests.ui.test_splunk_ta_example_addon_input_1.chrome_TestInput ► test_example_input_one_valid_input_name

Failed test found in:
  test-results/test.xml
Error:
  request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_valid_input_name>>
Raw output
request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_valid_input_name>>

    @pytest.fixture(scope="function", autouse=True)
    def ucc_smartx_selenium_wrapper(request):
        """
        Calls ucc_smartx_selenium_helper fixture
        """
        if "ucc_smartx_selenium_helper" in request.fixturenames:
>           request.node.selenium_helper = request.getfixturevalue(
                "ucc_smartx_selenium_helper"
            )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:254: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_valid_input_name>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
                selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )
                break
            except Exception as e:
                last_exc = e
                LOGGER.warning(
                    "Failed to configure the browser or login to Splunk instance for - Try={} \nTRACEBACK::{}".format(
                        try_number, traceback.format_exc()
                    )
                )
        else:
            LOGGER.error(
                "Could not connect to Browser or login to Splunk instance. Please check the logs for detailed error of each retry"
            )
>           raise (last_exc)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_valid_input_name>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
>               selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339720e20>
browser = 'chrome', browser_version = 'latest'
splunk_web_url = 'http://splunk:8000/'
splunk_mgmt_url = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')
debug = False, cred = ('admin', 'Chang3d!'), headless = False
test_case = 'chrome_test_example_input_one_valid_input_name'

    def __init__(
        self,
        browser,
        browser_version,
        splunk_web_url,
        splunk_mgmt_url,
        debug=False,
        cred=("admin", "Chang3d!"),
        headless=False,
        test_case=None,
    ):
        self.splunk_web_url = splunk_web_url
        self.splunk_mgmt_url = splunk_mgmt_url
        self.cred = cred
        self.test_case = test_case
        self.skip_saucelab_job = False
    
        if "grid" in browser:
            self.skip_saucelab_job = True
            debug = True
    
        if not debug:
            # Using Saucelabs
            self.init_sauce_env_variables()
    
        try:
            if browser == "firefox":
                if debug:
                    self.browser = webdriver.Firefox(
                        firefox_options=self.get_local_firefox_opts(headless),
                        log_path="selenium.log",
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_firefox_opts(
                            browser_version
                        ),
                    )
    
            elif browser == "chrome":
                if debug:
                    self.browser = webdriver.Chrome(
                        chrome_options=self.get_local_chrome_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_chrome_opts(
                            browser_version
                        ),
                    )
    
            # selenium local stack
            elif browser == "chrome_grid":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://chrome-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_grid":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://firefox-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
            # kubernetes selenium
            elif browser == "chrome_k8s":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_k8s":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
    
            elif browser == "edge":
                if debug:
                    self.browser = Edge(
                        executable_path="msedgedriver",
                        desired_capabilities=self.get_local_edge_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    command_executor = EdgeRemoteConnection(
                        "https://ondemand.saucelabs.com:443/wd/hub"
                    )
                    options = EdgeOptions()
                    options.use_chromium = True
                    self.browser = webdriver.Remote(
                        command_executor=command_executor,
                        options=options,
                        desired_capabilities=self.get_sauce_edge_opts(browser_version),
                    )
    
            elif browser == "IE":
                if debug:
                    self.browser = webdriver.Ie(capabilities=self.get_local_ie_opts())
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_ie_opts(browser_version),
                    )
            elif browser == "safari":
                if debug:
                    self.browser = webdriver.Safari()
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_safari_opts(
                            browser_version
                        ),
                    )
            else:
                raise Exception(
                    "No valid browser found.! expected=[firefox, chrome, safari], got={}".format(
                        browser
                    )
                )
        except Exception as e:
            raise e
    
        try:
            self.browser_session = self.browser.session_id
>           self.login_to_splunk(*self.cred)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:207: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339720e20>
cred = ('admin', 'Chang3d!')

    def login_to_splunk(self, *cred):
        try:
>           login_page = LoginPage(self)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339723f70>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339720e20>

    def __init__(self, ucc_smartx_selenium_helper):
        """
        :param ucc_smartx_selenium_helper: Fixture with selenium driver, urls(web, mgmt) and session key
        """
    
>       super().__init__(ucc_smartx_selenium_helper, ucc_smartx_rest_helper=None)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/login.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339723f70>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339720e20>
ucc_smartx_rest_helper = None, open_page = True

    def __init__(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, open_page=True
    ):
        """
        :param ucc_smartx_selenium_helper: The selenium webdriver
        :param ucc_smartx_rest_helper: Splunk web & management url. {"web": , "mgmt": }
        """
        if ucc_smartx_selenium_helper:
            self.browser = ucc_smartx_selenium_helper.browser
            self.splunk_web_url = ucc_smartx_selenium_helper.splunk_web_url
            if open_page:
>               self.open()

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339723f70>

    def open(self):
        """
        Abstract Method. Open the page
        """
>       self.browser.get(self.splunk_web_url)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="504c6b185e5547b48d612c616b6b7b0c")>
url = 'http://splunk:8000/'

    def get(self, url):
        """
        Loads a web page in the current browser session.
        """
>       self.execute(Command.GET, {'url': url})

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="504c6b185e5547b48d612c616b6b7b0c")>
driver_command = 'get', params = {'url': 'http://splunk:8000/'}

    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 0x7f2339723eb0>
response = {'status': 500, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x0060CE43+45171]\\n\\t(No symbol) [0x005990...ge": "unknown error: net::ERR_NAME_NOT_RESOLVED\\n  (Session info: chrome=117.0.5938.63)", "error": "unknown error"}}'}

    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.WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED
E         (Session info: chrome=117.0.5938.63)

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException

Check failure on line 0 in test-results/test.xml

See this annotation in the file changed.

@github-actions github-actions / test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1

pytest ► tests.ui.test_splunk_ta_example_addon_input_1.chrome_TestInput ► test_example_input_one_list_single_select_group_test

Failed test found in:
  test-results/test.xml
Error:
  request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_list_single_select_group_test>>
Raw output
request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_list_single_select_group_test>>

    @pytest.fixture(scope="function", autouse=True)
    def ucc_smartx_selenium_wrapper(request):
        """
        Calls ucc_smartx_selenium_helper fixture
        """
        if "ucc_smartx_selenium_helper" in request.fixturenames:
>           request.node.selenium_helper = request.getfixturevalue(
                "ucc_smartx_selenium_helper"
            )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:254: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_list_single_select_group_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
                selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )
                break
            except Exception as e:
                last_exc = e
                LOGGER.warning(
                    "Failed to configure the browser or login to Splunk instance for - Try={} \nTRACEBACK::{}".format(
                        try_number, traceback.format_exc()
                    )
                )
        else:
            LOGGER.error(
                "Could not connect to Browser or login to Splunk instance. Please check the logs for detailed error of each retry"
            )
>           raise (last_exc)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_list_single_select_group_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
>               selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339720370>
browser = 'chrome', browser_version = 'latest'
splunk_web_url = 'http://splunk:8000/'
splunk_mgmt_url = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')
debug = False, cred = ('admin', 'Chang3d!'), headless = False
test_case = 'chrome_test_example_input_one_list_single_select_group_test'

    def __init__(
        self,
        browser,
        browser_version,
        splunk_web_url,
        splunk_mgmt_url,
        debug=False,
        cred=("admin", "Chang3d!"),
        headless=False,
        test_case=None,
    ):
        self.splunk_web_url = splunk_web_url
        self.splunk_mgmt_url = splunk_mgmt_url
        self.cred = cred
        self.test_case = test_case
        self.skip_saucelab_job = False
    
        if "grid" in browser:
            self.skip_saucelab_job = True
            debug = True
    
        if not debug:
            # Using Saucelabs
            self.init_sauce_env_variables()
    
        try:
            if browser == "firefox":
                if debug:
                    self.browser = webdriver.Firefox(
                        firefox_options=self.get_local_firefox_opts(headless),
                        log_path="selenium.log",
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_firefox_opts(
                            browser_version
                        ),
                    )
    
            elif browser == "chrome":
                if debug:
                    self.browser = webdriver.Chrome(
                        chrome_options=self.get_local_chrome_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_chrome_opts(
                            browser_version
                        ),
                    )
    
            # selenium local stack
            elif browser == "chrome_grid":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://chrome-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_grid":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://firefox-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
            # kubernetes selenium
            elif browser == "chrome_k8s":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_k8s":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
    
            elif browser == "edge":
                if debug:
                    self.browser = Edge(
                        executable_path="msedgedriver",
                        desired_capabilities=self.get_local_edge_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    command_executor = EdgeRemoteConnection(
                        "https://ondemand.saucelabs.com:443/wd/hub"
                    )
                    options = EdgeOptions()
                    options.use_chromium = True
                    self.browser = webdriver.Remote(
                        command_executor=command_executor,
                        options=options,
                        desired_capabilities=self.get_sauce_edge_opts(browser_version),
                    )
    
            elif browser == "IE":
                if debug:
                    self.browser = webdriver.Ie(capabilities=self.get_local_ie_opts())
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_ie_opts(browser_version),
                    )
            elif browser == "safari":
                if debug:
                    self.browser = webdriver.Safari()
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_safari_opts(
                            browser_version
                        ),
                    )
            else:
                raise Exception(
                    "No valid browser found.! expected=[firefox, chrome, safari], got={}".format(
                        browser
                    )
                )
        except Exception as e:
            raise e
    
        try:
            self.browser_session = self.browser.session_id
>           self.login_to_splunk(*self.cred)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:207: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339720370>
cred = ('admin', 'Chang3d!')

    def login_to_splunk(self, *cred):
        try:
>           login_page = LoginPage(self)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339721cc0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339720370>

    def __init__(self, ucc_smartx_selenium_helper):
        """
        :param ucc_smartx_selenium_helper: Fixture with selenium driver, urls(web, mgmt) and session key
        """
    
>       super().__init__(ucc_smartx_selenium_helper, ucc_smartx_rest_helper=None)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/login.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339721cc0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339720370>
ucc_smartx_rest_helper = None, open_page = True

    def __init__(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, open_page=True
    ):
        """
        :param ucc_smartx_selenium_helper: The selenium webdriver
        :param ucc_smartx_rest_helper: Splunk web & management url. {"web": , "mgmt": }
        """
        if ucc_smartx_selenium_helper:
            self.browser = ucc_smartx_selenium_helper.browser
            self.splunk_web_url = ucc_smartx_selenium_helper.splunk_web_url
            if open_page:
>               self.open()

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339721cc0>

    def open(self):
        """
        Abstract Method. Open the page
        """
>       self.browser.get(self.splunk_web_url)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="f05ef576fe064d9e968528168b25b3e2")>
url = 'http://splunk:8000/'

    def get(self, url):
        """
        Loads a web page in the current browser session.
        """
>       self.execute(Command.GET, {'url': url})

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="f05ef576fe064d9e968528168b25b3e2")>
driver_command = 'get', params = {'url': 'http://splunk:8000/'}

    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 0x7f2339722b30>
response = {'status': 500, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x00AECE43+45171]\\n\\t(No symbol) [0x00A790...ge": "unknown error: net::ERR_NAME_NOT_RESOLVED\\n  (Session info: chrome=117.0.5938.63)", "error": "unknown error"}}'}

    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.WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED
E         (Session info: chrome=117.0.5938.63)

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException

Check failure on line 0 in test-results/test.xml

See this annotation in the file changed.

@github-actions github-actions / test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1

pytest ► tests.ui.test_splunk_ta_example_addon_input_1.chrome_TestInput ► test_example_input_one_select_value_single_select_group_test

Failed test found in:
  test-results/test.xml
Error:
  request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_select_value_single_select_group_test>>
Raw output
request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_select_value_single_select_group_test>>

    @pytest.fixture(scope="function", autouse=True)
    def ucc_smartx_selenium_wrapper(request):
        """
        Calls ucc_smartx_selenium_helper fixture
        """
        if "ucc_smartx_selenium_helper" in request.fixturenames:
>           request.node.selenium_helper = request.getfixturevalue(
                "ucc_smartx_selenium_helper"
            )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:254: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_select_value_single_select_group_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
                selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )
                break
            except Exception as e:
                last_exc = e
                LOGGER.warning(
                    "Failed to configure the browser or login to Splunk instance for - Try={} \nTRACEBACK::{}".format(
                        try_number, traceback.format_exc()
                    )
                )
        else:
            LOGGER.error(
                "Could not connect to Browser or login to Splunk instance. Please check the logs for detailed error of each retry"
            )
>           raise (last_exc)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_select_value_single_select_group_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
>               selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339afbc40>
browser = 'chrome', browser_version = 'latest'
splunk_web_url = 'http://splunk:8000/'
splunk_mgmt_url = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')
debug = False, cred = ('admin', 'Chang3d!'), headless = False
test_case = 'chrome_test_example_input_one_select_value_single_select_group_test'

    def __init__(
        self,
        browser,
        browser_version,
        splunk_web_url,
        splunk_mgmt_url,
        debug=False,
        cred=("admin", "Chang3d!"),
        headless=False,
        test_case=None,
    ):
        self.splunk_web_url = splunk_web_url
        self.splunk_mgmt_url = splunk_mgmt_url
        self.cred = cred
        self.test_case = test_case
        self.skip_saucelab_job = False
    
        if "grid" in browser:
            self.skip_saucelab_job = True
            debug = True
    
        if not debug:
            # Using Saucelabs
            self.init_sauce_env_variables()
    
        try:
            if browser == "firefox":
                if debug:
                    self.browser = webdriver.Firefox(
                        firefox_options=self.get_local_firefox_opts(headless),
                        log_path="selenium.log",
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_firefox_opts(
                            browser_version
                        ),
                    )
    
            elif browser == "chrome":
                if debug:
                    self.browser = webdriver.Chrome(
                        chrome_options=self.get_local_chrome_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_chrome_opts(
                            browser_version
                        ),
                    )
    
            # selenium local stack
            elif browser == "chrome_grid":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://chrome-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_grid":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://firefox-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
            # kubernetes selenium
            elif browser == "chrome_k8s":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_k8s":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
    
            elif browser == "edge":
                if debug:
                    self.browser = Edge(
                        executable_path="msedgedriver",
                        desired_capabilities=self.get_local_edge_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    command_executor = EdgeRemoteConnection(
                        "https://ondemand.saucelabs.com:443/wd/hub"
                    )
                    options = EdgeOptions()
                    options.use_chromium = True
                    self.browser = webdriver.Remote(
                        command_executor=command_executor,
                        options=options,
                        desired_capabilities=self.get_sauce_edge_opts(browser_version),
                    )
    
            elif browser == "IE":
                if debug:
                    self.browser = webdriver.Ie(capabilities=self.get_local_ie_opts())
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_ie_opts(browser_version),
                    )
            elif browser == "safari":
                if debug:
                    self.browser = webdriver.Safari()
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_safari_opts(
                            browser_version
                        ),
                    )
            else:
                raise Exception(
                    "No valid browser found.! expected=[firefox, chrome, safari], got={}".format(
                        browser
                    )
                )
        except Exception as e:
            raise e
    
        try:
            self.browser_session = self.browser.session_id
>           self.login_to_splunk(*self.cred)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:207: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339afbc40>
cred = ('admin', 'Chang3d!')

    def login_to_splunk(self, *cred):
        try:
>           login_page = LoginPage(self)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339afb820>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339afbc40>

    def __init__(self, ucc_smartx_selenium_helper):
        """
        :param ucc_smartx_selenium_helper: Fixture with selenium driver, urls(web, mgmt) and session key
        """
    
>       super().__init__(ucc_smartx_selenium_helper, ucc_smartx_rest_helper=None)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/login.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339afb820>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339afbc40>
ucc_smartx_rest_helper = None, open_page = True

    def __init__(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, open_page=True
    ):
        """
        :param ucc_smartx_selenium_helper: The selenium webdriver
        :param ucc_smartx_rest_helper: Splunk web & management url. {"web": , "mgmt": }
        """
        if ucc_smartx_selenium_helper:
            self.browser = ucc_smartx_selenium_helper.browser
            self.splunk_web_url = ucc_smartx_selenium_helper.splunk_web_url
            if open_page:
>               self.open()

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339afb820>

    def open(self):
        """
        Abstract Method. Open the page
        """
>       self.browser.get(self.splunk_web_url)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="f3efa332cfba4388a2bbeab61628c0ad")>
url = 'http://splunk:8000/'

    def get(self, url):
        """
        Loads a web page in the current browser session.
        """
>       self.execute(Command.GET, {'url': url})

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="f3efa332cfba4388a2bbeab61628c0ad")>
driver_command = 'get', params = {'url': 'http://splunk:8000/'}

    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 0x7f2339af9690>
response = {'status': 500, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x0053CE43+45171]\\n\\t(No symbol) [0x004C90...ge": "unknown error: net::ERR_NAME_NOT_RESOLVED\\n  (Session info: chrome=117.0.5938.63)", "error": "unknown error"}}'}

    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.WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED
E         (Session info: chrome=117.0.5938.63)

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException

Check failure on line 0 in test-results/test.xml

See this annotation in the file changed.

@github-actions github-actions / test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1

pytest ► tests.ui.test_splunk_ta_example_addon_input_1.chrome_TestInput ► test_example_input_one_search_value_single_select_group_test

Failed test found in:
  test-results/test.xml
Error:
  request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_search_value_single_select_group_test>>
Raw output
request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_search_value_single_select_group_test>>

    @pytest.fixture(scope="function", autouse=True)
    def ucc_smartx_selenium_wrapper(request):
        """
        Calls ucc_smartx_selenium_helper fixture
        """
        if "ucc_smartx_selenium_helper" in request.fixturenames:
>           request.node.selenium_helper = request.getfixturevalue(
                "ucc_smartx_selenium_helper"
            )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:254: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_search_value_single_select_group_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
                selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )
                break
            except Exception as e:
                last_exc = e
                LOGGER.warning(
                    "Failed to configure the browser or login to Splunk instance for - Try={} \nTRACEBACK::{}".format(
                        try_number, traceback.format_exc()
                    )
                )
        else:
            LOGGER.error(
                "Could not connect to Browser or login to Splunk instance. Please check the logs for detailed error of each retry"
            )
>           raise (last_exc)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_search_value_single_select_group_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
>               selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339a22110>
browser = 'chrome', browser_version = 'latest'
splunk_web_url = 'http://splunk:8000/'
splunk_mgmt_url = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')
debug = False, cred = ('admin', 'Chang3d!'), headless = False
test_case = 'chrome_test_example_input_one_search_value_single_select_group_test'

    def __init__(
        self,
        browser,
        browser_version,
        splunk_web_url,
        splunk_mgmt_url,
        debug=False,
        cred=("admin", "Chang3d!"),
        headless=False,
        test_case=None,
    ):
        self.splunk_web_url = splunk_web_url
        self.splunk_mgmt_url = splunk_mgmt_url
        self.cred = cred
        self.test_case = test_case
        self.skip_saucelab_job = False
    
        if "grid" in browser:
            self.skip_saucelab_job = True
            debug = True
    
        if not debug:
            # Using Saucelabs
            self.init_sauce_env_variables()
    
        try:
            if browser == "firefox":
                if debug:
                    self.browser = webdriver.Firefox(
                        firefox_options=self.get_local_firefox_opts(headless),
                        log_path="selenium.log",
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_firefox_opts(
                            browser_version
                        ),
                    )
    
            elif browser == "chrome":
                if debug:
                    self.browser = webdriver.Chrome(
                        chrome_options=self.get_local_chrome_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_chrome_opts(
                            browser_version
                        ),
                    )
    
            # selenium local stack
            elif browser == "chrome_grid":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://chrome-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_grid":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://firefox-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
            # kubernetes selenium
            elif browser == "chrome_k8s":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_k8s":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
    
            elif browser == "edge":
                if debug:
                    self.browser = Edge(
                        executable_path="msedgedriver",
                        desired_capabilities=self.get_local_edge_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    command_executor = EdgeRemoteConnection(
                        "https://ondemand.saucelabs.com:443/wd/hub"
                    )
                    options = EdgeOptions()
                    options.use_chromium = True
                    self.browser = webdriver.Remote(
                        command_executor=command_executor,
                        options=options,
                        desired_capabilities=self.get_sauce_edge_opts(browser_version),
                    )
    
            elif browser == "IE":
                if debug:
                    self.browser = webdriver.Ie(capabilities=self.get_local_ie_opts())
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_ie_opts(browser_version),
                    )
            elif browser == "safari":
                if debug:
                    self.browser = webdriver.Safari()
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_safari_opts(
                            browser_version
                        ),
                    )
            else:
                raise Exception(
                    "No valid browser found.! expected=[firefox, chrome, safari], got={}".format(
                        browser
                    )
                )
        except Exception as e:
            raise e
    
        try:
            self.browser_session = self.browser.session_id
>           self.login_to_splunk(*self.cred)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:207: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339a22110>
cred = ('admin', 'Chang3d!')

    def login_to_splunk(self, *cred):
        try:
>           login_page = LoginPage(self)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339a21090>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339a22110>

    def __init__(self, ucc_smartx_selenium_helper):
        """
        :param ucc_smartx_selenium_helper: Fixture with selenium driver, urls(web, mgmt) and session key
        """
    
>       super().__init__(ucc_smartx_selenium_helper, ucc_smartx_rest_helper=None)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/login.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339a21090>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339a22110>
ucc_smartx_rest_helper = None, open_page = True

    def __init__(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, open_page=True
    ):
        """
        :param ucc_smartx_selenium_helper: The selenium webdriver
        :param ucc_smartx_rest_helper: Splunk web & management url. {"web": , "mgmt": }
        """
        if ucc_smartx_selenium_helper:
            self.browser = ucc_smartx_selenium_helper.browser
            self.splunk_web_url = ucc_smartx_selenium_helper.splunk_web_url
            if open_page:
>               self.open()

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f2339a21090>

    def open(self):
        """
        Abstract Method. Open the page
        """
>       self.browser.get(self.splunk_web_url)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="5a5224087fc14940820a4582811551cf")>
url = 'http://splunk:8000/'

    def get(self, url):
        """
        Loads a web page in the current browser session.
        """
>       self.execute(Command.GET, {'url': url})

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="5a5224087fc14940820a4582811551cf")>
driver_command = 'get', params = {'url': 'http://splunk:8000/'}

    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 0x7f2339a204c0>
response = {'status': 500, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x00D4CE43+45171]\\n\\t(No symbol) [0x00CD90...ge": "unknown error: net::ERR_NAME_NOT_RESOLVED\\n  (Session info: chrome=117.0.5938.63)", "error": "unknown error"}}'}

    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.WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED
E         (Session info: chrome=117.0.5938.63)

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException

Check failure on line 0 in test-results/test.xml

See this annotation in the file changed.

@github-actions github-actions / test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1

pytest ► tests.ui.test_splunk_ta_example_addon_input_1.chrome_TestInput ► test_example_input_one_default_value_multiple_select_test

Failed test found in:
  test-results/test.xml
Error:
  request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_default_value_multiple_select_test>>
Raw output
request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_default_value_multiple_select_test>>

    @pytest.fixture(scope="function", autouse=True)
    def ucc_smartx_selenium_wrapper(request):
        """
        Calls ucc_smartx_selenium_helper fixture
        """
        if "ucc_smartx_selenium_helper" in request.fixturenames:
>           request.node.selenium_helper = request.getfixturevalue(
                "ucc_smartx_selenium_helper"
            )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:254: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_default_value_multiple_select_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
                selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )
                break
            except Exception as e:
                last_exc = e
                LOGGER.warning(
                    "Failed to configure the browser or login to Splunk instance for - Try={} \nTRACEBACK::{}".format(
                        try_number, traceback.format_exc()
                    )
                )
        else:
            LOGGER.error(
                "Could not connect to Browser or login to Splunk instance. Please check the logs for detailed error of each retry"
            )
>           raise (last_exc)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_default_value_multiple_select_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
>               selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339725600>
browser = 'chrome', browser_version = 'latest'
splunk_web_url = 'http://splunk:8000/'
splunk_mgmt_url = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')
debug = False, cred = ('admin', 'Chang3d!'), headless = False
test_case = 'chrome_test_example_input_one_default_value_multiple_select_test'

    def __init__(
        self,
        browser,
        browser_version,
        splunk_web_url,
        splunk_mgmt_url,
        debug=False,
        cred=("admin", "Chang3d!"),
        headless=False,
        test_case=None,
    ):
        self.splunk_web_url = splunk_web_url
        self.splunk_mgmt_url = splunk_mgmt_url
        self.cred = cred
        self.test_case = test_case
        self.skip_saucelab_job = False
    
        if "grid" in browser:
            self.skip_saucelab_job = True
            debug = True
    
        if not debug:
            # Using Saucelabs
            self.init_sauce_env_variables()
    
        try:
            if browser == "firefox":
                if debug:
                    self.browser = webdriver.Firefox(
                        firefox_options=self.get_local_firefox_opts(headless),
                        log_path="selenium.log",
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_firefox_opts(
                            browser_version
                        ),
                    )
    
            elif browser == "chrome":
                if debug:
                    self.browser = webdriver.Chrome(
                        chrome_options=self.get_local_chrome_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_chrome_opts(
                            browser_version
                        ),
                    )
    
            # selenium local stack
            elif browser == "chrome_grid":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://chrome-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_grid":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://firefox-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
            # kubernetes selenium
            elif browser == "chrome_k8s":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_k8s":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
    
            elif browser == "edge":
                if debug:
                    self.browser = Edge(
                        executable_path="msedgedriver",
                        desired_capabilities=self.get_local_edge_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    command_executor = EdgeRemoteConnection(
                        "https://ondemand.saucelabs.com:443/wd/hub"
                    )
                    options = EdgeOptions()
                    options.use_chromium = True
                    self.browser = webdriver.Remote(
                        command_executor=command_executor,
                        options=options,
                        desired_capabilities=self.get_sauce_edge_opts(browser_version),
                    )
    
            elif browser == "IE":
                if debug:
                    self.browser = webdriver.Ie(capabilities=self.get_local_ie_opts())
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_ie_opts(browser_version),
                    )
            elif browser == "safari":
                if debug:
                    self.browser = webdriver.Safari()
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_safari_opts(
                            browser_version
                        ),
                    )
            else:
                raise Exception(
                    "No valid browser found.! expected=[firefox, chrome, safari], got={}".format(
                        browser
                    )
                )
        except Exception as e:
            raise e
    
        try:
            self.browser_session = self.browser.session_id
>           self.login_to_splunk(*self.cred)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:207: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339725600>
cred = ('admin', 'Chang3d!')

    def login_to_splunk(self, *cred):
        try:
>           login_page = LoginPage(self)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397264d0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339725600>

    def __init__(self, ucc_smartx_selenium_helper):
        """
        :param ucc_smartx_selenium_helper: Fixture with selenium driver, urls(web, mgmt) and session key
        """
    
>       super().__init__(ucc_smartx_selenium_helper, ucc_smartx_rest_helper=None)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/login.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397264d0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339725600>
ucc_smartx_rest_helper = None, open_page = True

    def __init__(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, open_page=True
    ):
        """
        :param ucc_smartx_selenium_helper: The selenium webdriver
        :param ucc_smartx_rest_helper: Splunk web & management url. {"web": , "mgmt": }
        """
        if ucc_smartx_selenium_helper:
            self.browser = ucc_smartx_selenium_helper.browser
            self.splunk_web_url = ucc_smartx_selenium_helper.splunk_web_url
            if open_page:
>               self.open()

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397264d0>

    def open(self):
        """
        Abstract Method. Open the page
        """
>       self.browser.get(self.splunk_web_url)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="4a78e1c4311b4e6596d616ce9ddd003c")>
url = 'http://splunk:8000/'

    def get(self, url):
        """
        Loads a web page in the current browser session.
        """
>       self.execute(Command.GET, {'url': url})

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="4a78e1c4311b4e6596d616ce9ddd003c")>
driver_command = 'get', params = {'url': 'http://splunk:8000/'}

    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 0x7f2339725de0>
response = {'status': 500, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x00B2CE43+45171]\\n\\t(No symbol) [0x00AB90...ge": "unknown error: net::ERR_NAME_NOT_RESOLVED\\n  (Session info: chrome=117.0.5938.63)", "error": "unknown error"}}'}

    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.WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED
E         (Session info: chrome=117.0.5938.63)

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException

Check failure on line 0 in test-results/test.xml

See this annotation in the file changed.

@github-actions github-actions / test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1

pytest ► tests.ui.test_splunk_ta_example_addon_input_1.chrome_TestInput ► test_example_input_one_list_multiple_select_test

Failed test found in:
  test-results/test.xml
Error:
  request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_list_multiple_select_test>>
Raw output
request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_list_multiple_select_test>>

    @pytest.fixture(scope="function", autouse=True)
    def ucc_smartx_selenium_wrapper(request):
        """
        Calls ucc_smartx_selenium_helper fixture
        """
        if "ucc_smartx_selenium_helper" in request.fixturenames:
>           request.node.selenium_helper = request.getfixturevalue(
                "ucc_smartx_selenium_helper"
            )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:254: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_list_multiple_select_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
                selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )
                break
            except Exception as e:
                last_exc = e
                LOGGER.warning(
                    "Failed to configure the browser or login to Splunk instance for - Try={} \nTRACEBACK::{}".format(
                        try_number, traceback.format_exc()
                    )
                )
        else:
            LOGGER.error(
                "Could not connect to Browser or login to Splunk instance. Please check the logs for detailed error of each retry"
            )
>           raise (last_exc)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_list_multiple_select_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
>               selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339727520>
browser = 'chrome', browser_version = 'latest'
splunk_web_url = 'http://splunk:8000/'
splunk_mgmt_url = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')
debug = False, cred = ('admin', 'Chang3d!'), headless = False
test_case = 'chrome_test_example_input_one_list_multiple_select_test'

    def __init__(
        self,
        browser,
        browser_version,
        splunk_web_url,
        splunk_mgmt_url,
        debug=False,
        cred=("admin", "Chang3d!"),
        headless=False,
        test_case=None,
    ):
        self.splunk_web_url = splunk_web_url
        self.splunk_mgmt_url = splunk_mgmt_url
        self.cred = cred
        self.test_case = test_case
        self.skip_saucelab_job = False
    
        if "grid" in browser:
            self.skip_saucelab_job = True
            debug = True
    
        if not debug:
            # Using Saucelabs
            self.init_sauce_env_variables()
    
        try:
            if browser == "firefox":
                if debug:
                    self.browser = webdriver.Firefox(
                        firefox_options=self.get_local_firefox_opts(headless),
                        log_path="selenium.log",
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_firefox_opts(
                            browser_version
                        ),
                    )
    
            elif browser == "chrome":
                if debug:
                    self.browser = webdriver.Chrome(
                        chrome_options=self.get_local_chrome_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_chrome_opts(
                            browser_version
                        ),
                    )
    
            # selenium local stack
            elif browser == "chrome_grid":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://chrome-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_grid":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://firefox-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
            # kubernetes selenium
            elif browser == "chrome_k8s":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_k8s":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
    
            elif browser == "edge":
                if debug:
                    self.browser = Edge(
                        executable_path="msedgedriver",
                        desired_capabilities=self.get_local_edge_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    command_executor = EdgeRemoteConnection(
                        "https://ondemand.saucelabs.com:443/wd/hub"
                    )
                    options = EdgeOptions()
                    options.use_chromium = True
                    self.browser = webdriver.Remote(
                        command_executor=command_executor,
                        options=options,
                        desired_capabilities=self.get_sauce_edge_opts(browser_version),
                    )
    
            elif browser == "IE":
                if debug:
                    self.browser = webdriver.Ie(capabilities=self.get_local_ie_opts())
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_ie_opts(browser_version),
                    )
            elif browser == "safari":
                if debug:
                    self.browser = webdriver.Safari()
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_safari_opts(
                            browser_version
                        ),
                    )
            else:
                raise Exception(
                    "No valid browser found.! expected=[firefox, chrome, safari], got={}".format(
                        browser
                    )
                )
        except Exception as e:
            raise e
    
        try:
            self.browser_session = self.browser.session_id
>           self.login_to_splunk(*self.cred)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:207: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339727520>
cred = ('admin', 'Chang3d!')

    def login_to_splunk(self, *cred):
        try:
>           login_page = LoginPage(self)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397258d0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339727520>

    def __init__(self, ucc_smartx_selenium_helper):
        """
        :param ucc_smartx_selenium_helper: Fixture with selenium driver, urls(web, mgmt) and session key
        """
    
>       super().__init__(ucc_smartx_selenium_helper, ucc_smartx_rest_helper=None)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/login.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397258d0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f2339727520>
ucc_smartx_rest_helper = None, open_page = True

    def __init__(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, open_page=True
    ):
        """
        :param ucc_smartx_selenium_helper: The selenium webdriver
        :param ucc_smartx_rest_helper: Splunk web & management url. {"web": , "mgmt": }
        """
        if ucc_smartx_selenium_helper:
            self.browser = ucc_smartx_selenium_helper.browser
            self.splunk_web_url = ucc_smartx_selenium_helper.splunk_web_url
            if open_page:
>               self.open()

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397258d0>

    def open(self):
        """
        Abstract Method. Open the page
        """
>       self.browser.get(self.splunk_web_url)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="5677bece334e43de9a61927a1b3271ac")>
url = 'http://splunk:8000/'

    def get(self, url):
        """
        Loads a web page in the current browser session.
        """
>       self.execute(Command.GET, {'url': url})

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="5677bece334e43de9a61927a1b3271ac")>
driver_command = 'get', params = {'url': 'http://splunk:8000/'}

    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 0x7f2339727a00>
response = {'status': 500, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x00BDCE43+45171]\\n\\t(No symbol) [0x00B690...ge": "unknown error: net::ERR_NAME_NOT_RESOLVED\\n  (Session info: chrome=117.0.5938.63)", "error": "unknown error"}}'}

    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.WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED
E         (Session info: chrome=117.0.5938.63)

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException

Check failure on line 0 in test-results/test.xml

See this annotation in the file changed.

@github-actions github-actions / test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1

pytest ► tests.ui.test_splunk_ta_example_addon_input_1.chrome_TestInput ► test_example_input_one_select_value_multiple_select_test

Failed test found in:
  test-results/test.xml
Error:
  request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_select_value_multiple_select_test>>
Raw output
request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_select_value_multiple_select_test>>

    @pytest.fixture(scope="function", autouse=True)
    def ucc_smartx_selenium_wrapper(request):
        """
        Calls ucc_smartx_selenium_helper fixture
        """
        if "ucc_smartx_selenium_helper" in request.fixturenames:
>           request.node.selenium_helper = request.getfixturevalue(
                "ucc_smartx_selenium_helper"
            )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:254: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_select_value_multiple_select_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
                selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )
                break
            except Exception as e:
                last_exc = e
                LOGGER.warning(
                    "Failed to configure the browser or login to Splunk instance for - Try={} \nTRACEBACK::{}".format(
                        try_number, traceback.format_exc()
                    )
                )
        else:
            LOGGER.error(
                "Could not connect to Browser or login to Splunk instance. Please check the logs for detailed error of each retry"
            )
>           raise (last_exc)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_select_value_multiple_select_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
>               selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f23397e9330>
browser = 'chrome', browser_version = 'latest'
splunk_web_url = 'http://splunk:8000/'
splunk_mgmt_url = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')
debug = False, cred = ('admin', 'Chang3d!'), headless = False
test_case = 'chrome_test_example_input_one_select_value_multiple_select_test'

    def __init__(
        self,
        browser,
        browser_version,
        splunk_web_url,
        splunk_mgmt_url,
        debug=False,
        cred=("admin", "Chang3d!"),
        headless=False,
        test_case=None,
    ):
        self.splunk_web_url = splunk_web_url
        self.splunk_mgmt_url = splunk_mgmt_url
        self.cred = cred
        self.test_case = test_case
        self.skip_saucelab_job = False
    
        if "grid" in browser:
            self.skip_saucelab_job = True
            debug = True
    
        if not debug:
            # Using Saucelabs
            self.init_sauce_env_variables()
    
        try:
            if browser == "firefox":
                if debug:
                    self.browser = webdriver.Firefox(
                        firefox_options=self.get_local_firefox_opts(headless),
                        log_path="selenium.log",
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_firefox_opts(
                            browser_version
                        ),
                    )
    
            elif browser == "chrome":
                if debug:
                    self.browser = webdriver.Chrome(
                        chrome_options=self.get_local_chrome_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_chrome_opts(
                            browser_version
                        ),
                    )
    
            # selenium local stack
            elif browser == "chrome_grid":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://chrome-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_grid":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://firefox-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
            # kubernetes selenium
            elif browser == "chrome_k8s":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_k8s":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
    
            elif browser == "edge":
                if debug:
                    self.browser = Edge(
                        executable_path="msedgedriver",
                        desired_capabilities=self.get_local_edge_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    command_executor = EdgeRemoteConnection(
                        "https://ondemand.saucelabs.com:443/wd/hub"
                    )
                    options = EdgeOptions()
                    options.use_chromium = True
                    self.browser = webdriver.Remote(
                        command_executor=command_executor,
                        options=options,
                        desired_capabilities=self.get_sauce_edge_opts(browser_version),
                    )
    
            elif browser == "IE":
                if debug:
                    self.browser = webdriver.Ie(capabilities=self.get_local_ie_opts())
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_ie_opts(browser_version),
                    )
            elif browser == "safari":
                if debug:
                    self.browser = webdriver.Safari()
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_safari_opts(
                            browser_version
                        ),
                    )
            else:
                raise Exception(
                    "No valid browser found.! expected=[firefox, chrome, safari], got={}".format(
                        browser
                    )
                )
        except Exception as e:
            raise e
    
        try:
            self.browser_session = self.browser.session_id
>           self.login_to_splunk(*self.cred)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:207: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f23397e9330>
cred = ('admin', 'Chang3d!')

    def login_to_splunk(self, *cred):
        try:
>           login_page = LoginPage(self)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397e85e0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f23397e9330>

    def __init__(self, ucc_smartx_selenium_helper):
        """
        :param ucc_smartx_selenium_helper: Fixture with selenium driver, urls(web, mgmt) and session key
        """
    
>       super().__init__(ucc_smartx_selenium_helper, ucc_smartx_rest_helper=None)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/login.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397e85e0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f23397e9330>
ucc_smartx_rest_helper = None, open_page = True

    def __init__(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, open_page=True
    ):
        """
        :param ucc_smartx_selenium_helper: The selenium webdriver
        :param ucc_smartx_rest_helper: Splunk web & management url. {"web": , "mgmt": }
        """
        if ucc_smartx_selenium_helper:
            self.browser = ucc_smartx_selenium_helper.browser
            self.splunk_web_url = ucc_smartx_selenium_helper.splunk_web_url
            if open_page:
>               self.open()

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397e85e0>

    def open(self):
        """
        Abstract Method. Open the page
        """
>       self.browser.get(self.splunk_web_url)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="ae5089c22fc84594b93d3ec52cf52834")>
url = 'http://splunk:8000/'

    def get(self, url):
        """
        Loads a web page in the current browser session.
        """
>       self.execute(Command.GET, {'url': url})

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="ae5089c22fc84594b93d3ec52cf52834")>
driver_command = 'get', params = {'url': 'http://splunk:8000/'}

    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 0x7f23397e9690>
response = {'status': 500, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x009ECE43+45171]\\n\\t(No symbol) [0x009790...ge": "unknown error: net::ERR_NAME_NOT_RESOLVED\\n  (Session info: chrome=117.0.5938.63)", "error": "unknown error"}}'}

    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.WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED
E         (Session info: chrome=117.0.5938.63)

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException

Check failure on line 0 in test-results/test.xml

See this annotation in the file changed.

@github-actions github-actions / test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1

pytest ► tests.ui.test_splunk_ta_example_addon_input_1.chrome_TestInput ► test_example_input_one_select_multiple_values_multiple_select_test

Failed test found in:
  test-results/test.xml
Error:
  request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_select_multiple_values_multiple_select_test>>
Raw output
request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_select_multiple_values_multiple_select_test>>

    @pytest.fixture(scope="function", autouse=True)
    def ucc_smartx_selenium_wrapper(request):
        """
        Calls ucc_smartx_selenium_helper fixture
        """
        if "ucc_smartx_selenium_helper" in request.fixturenames:
>           request.node.selenium_helper = request.getfixturevalue(
                "ucc_smartx_selenium_helper"
            )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:254: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_select_multiple_values_multiple_select_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
                selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )
                break
            except Exception as e:
                last_exc = e
                LOGGER.warning(
                    "Failed to configure the browser or login to Splunk instance for - Try={} \nTRACEBACK::{}".format(
                        try_number, traceback.format_exc()
                    )
                )
        else:
            LOGGER.error(
                "Could not connect to Browser or login to Splunk instance. Please check the logs for detailed error of each retry"
            )
>           raise (last_exc)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_select_multiple_values_multiple_select_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
>               selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f23397ce7d0>
browser = 'chrome', browser_version = 'latest'
splunk_web_url = 'http://splunk:8000/'
splunk_mgmt_url = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')
debug = False, cred = ('admin', 'Chang3d!'), headless = False
test_case = 'chrome_test_example_input_one_select_multiple_values_multiple_select_test'

    def __init__(
        self,
        browser,
        browser_version,
        splunk_web_url,
        splunk_mgmt_url,
        debug=False,
        cred=("admin", "Chang3d!"),
        headless=False,
        test_case=None,
    ):
        self.splunk_web_url = splunk_web_url
        self.splunk_mgmt_url = splunk_mgmt_url
        self.cred = cred
        self.test_case = test_case
        self.skip_saucelab_job = False
    
        if "grid" in browser:
            self.skip_saucelab_job = True
            debug = True
    
        if not debug:
            # Using Saucelabs
            self.init_sauce_env_variables()
    
        try:
            if browser == "firefox":
                if debug:
                    self.browser = webdriver.Firefox(
                        firefox_options=self.get_local_firefox_opts(headless),
                        log_path="selenium.log",
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_firefox_opts(
                            browser_version
                        ),
                    )
    
            elif browser == "chrome":
                if debug:
                    self.browser = webdriver.Chrome(
                        chrome_options=self.get_local_chrome_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_chrome_opts(
                            browser_version
                        ),
                    )
    
            # selenium local stack
            elif browser == "chrome_grid":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://chrome-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_grid":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://firefox-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
            # kubernetes selenium
            elif browser == "chrome_k8s":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_k8s":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
    
            elif browser == "edge":
                if debug:
                    self.browser = Edge(
                        executable_path="msedgedriver",
                        desired_capabilities=self.get_local_edge_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    command_executor = EdgeRemoteConnection(
                        "https://ondemand.saucelabs.com:443/wd/hub"
                    )
                    options = EdgeOptions()
                    options.use_chromium = True
                    self.browser = webdriver.Remote(
                        command_executor=command_executor,
                        options=options,
                        desired_capabilities=self.get_sauce_edge_opts(browser_version),
                    )
    
            elif browser == "IE":
                if debug:
                    self.browser = webdriver.Ie(capabilities=self.get_local_ie_opts())
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_ie_opts(browser_version),
                    )
            elif browser == "safari":
                if debug:
                    self.browser = webdriver.Safari()
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_safari_opts(
                            browser_version
                        ),
                    )
            else:
                raise Exception(
                    "No valid browser found.! expected=[firefox, chrome, safari], got={}".format(
                        browser
                    )
                )
        except Exception as e:
            raise e
    
        try:
            self.browser_session = self.browser.session_id
>           self.login_to_splunk(*self.cred)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:207: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f23397ce7d0>
cred = ('admin', 'Chang3d!')

    def login_to_splunk(self, *cred):
        try:
>           login_page = LoginPage(self)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397ce2c0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f23397ce7d0>

    def __init__(self, ucc_smartx_selenium_helper):
        """
        :param ucc_smartx_selenium_helper: Fixture with selenium driver, urls(web, mgmt) and session key
        """
    
>       super().__init__(ucc_smartx_selenium_helper, ucc_smartx_rest_helper=None)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/login.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397ce2c0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f23397ce7d0>
ucc_smartx_rest_helper = None, open_page = True

    def __init__(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, open_page=True
    ):
        """
        :param ucc_smartx_selenium_helper: The selenium webdriver
        :param ucc_smartx_rest_helper: Splunk web & management url. {"web": , "mgmt": }
        """
        if ucc_smartx_selenium_helper:
            self.browser = ucc_smartx_selenium_helper.browser
            self.splunk_web_url = ucc_smartx_selenium_helper.splunk_web_url
            if open_page:
>               self.open()

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397ce2c0>

    def open(self):
        """
        Abstract Method. Open the page
        """
>       self.browser.get(self.splunk_web_url)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="5246674b0b374559a74c185229dede30")>
url = 'http://splunk:8000/'

    def get(self, url):
        """
        Loads a web page in the current browser session.
        """
>       self.execute(Command.GET, {'url': url})

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="5246674b0b374559a74c185229dede30")>
driver_command = 'get', params = {'url': 'http://splunk:8000/'}

    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 0x7f23397cd420>
response = {'status': 500, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x0031CE43+45171]\\n\\t(No symbol) [0x002A90...ge": "unknown error: net::ERR_NAME_NOT_RESOLVED\\n  (Session info: chrome=117.0.5938.63)", "error": "unknown error"}}'}

    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.WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED
E         (Session info: chrome=117.0.5938.63)

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException

Check failure on line 0 in test-results/test.xml

See this annotation in the file changed.

@github-actions github-actions / test-report-8.2.12__chrome_test_splunk_ta_example_addon_input_1

pytest ► tests.ui.test_splunk_ta_example_addon_input_1.chrome_TestInput ► test_example_input_one_deselect_multiple_select_test

Failed test found in:
  test-results/test.xml
Error:
  request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_deselect_multiple_select_test>>
Raw output
request = <SubRequest 'ucc_smartx_selenium_wrapper' for <Function test_example_input_one_deselect_multiple_select_test>>

    @pytest.fixture(scope="function", autouse=True)
    def ucc_smartx_selenium_wrapper(request):
        """
        Calls ucc_smartx_selenium_helper fixture
        """
        if "ucc_smartx_selenium_helper" in request.fixturenames:
>           request.node.selenium_helper = request.getfixturevalue(
                "ucc_smartx_selenium_helper"
            )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:254: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_deselect_multiple_select_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
                selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )
                break
            except Exception as e:
                last_exc = e
                LOGGER.warning(
                    "Failed to configure the browser or login to Splunk instance for - Try={} \nTRACEBACK::{}".format(
                        try_number, traceback.format_exc()
                    )
                )
        else:
            LOGGER.error(
                "Could not connect to Browser or login to Splunk instance. Please check the logs for detailed error of each retry"
            )
>           raise (last_exc)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:198: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

request = <SubRequest 'ucc_smartx_selenium_helper' for <Function test_example_input_one_deselect_multiple_select_test>>
ucc_smartx_configs = SmartConfigs(driver='chrome', driver_version='latest', local_run=False, retry_count=3, headless_run=False)
splunk = {'forwarder_host': 'splunk', 'host': 'splunk', 'password': 'Chang3d!', 'port': '8089', ...}
splunk_web_uri = 'http://splunk:8000/'
splunk_rest_uri = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')

    @pytest.fixture(scope=get_browser_scope)
    def ucc_smartx_selenium_helper(
        request, ucc_smartx_configs, splunk, splunk_web_uri, splunk_rest_uri
    ):
        # Try to configure selenium & Login to splunk instance
        test_case = "{}_{}".format(
            ucc_smartx_configs.driver, request.node.nodeid.split("::")[-1]
        )
        for try_number in range(ucc_smartx_configs.retry_count):
            last_exc = Exception()
            try:
>               selenium_helper = SeleniumHelper(
                    ucc_smartx_configs.driver,
                    ucc_smartx_configs.driver_version,
                    splunk_web_uri,
                    splunk_rest_uri,
                    debug=ucc_smartx_configs.local_run,
                    cred=(splunk["username"], splunk["password"]),
                    headless=ucc_smartx_configs.headless_run,
                    test_case=test_case,
                )

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/plugin.py:176: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f23397317e0>
browser = 'chrome', browser_version = 'latest'
splunk_web_url = 'http://splunk:8000/'
splunk_mgmt_url = (<requests.sessions.Session object at 0x7f2339a207c0>, 'https://splunk:8089/')
debug = False, cred = ('admin', 'Chang3d!'), headless = False
test_case = 'chrome_test_example_input_one_deselect_multiple_select_test'

    def __init__(
        self,
        browser,
        browser_version,
        splunk_web_url,
        splunk_mgmt_url,
        debug=False,
        cred=("admin", "Chang3d!"),
        headless=False,
        test_case=None,
    ):
        self.splunk_web_url = splunk_web_url
        self.splunk_mgmt_url = splunk_mgmt_url
        self.cred = cred
        self.test_case = test_case
        self.skip_saucelab_job = False
    
        if "grid" in browser:
            self.skip_saucelab_job = True
            debug = True
    
        if not debug:
            # Using Saucelabs
            self.init_sauce_env_variables()
    
        try:
            if browser == "firefox":
                if debug:
                    self.browser = webdriver.Firefox(
                        firefox_options=self.get_local_firefox_opts(headless),
                        log_path="selenium.log",
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_firefox_opts(
                            browser_version
                        ),
                    )
    
            elif browser == "chrome":
                if debug:
                    self.browser = webdriver.Chrome(
                        chrome_options=self.get_local_chrome_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_chrome_opts(
                            browser_version
                        ),
                    )
    
            # selenium local stack
            elif browser == "chrome_grid":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://chrome-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_grid":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://firefox-grid:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
            # kubernetes selenium
            elif browser == "chrome_k8s":
                google_cert_opts = {
                    "goog:chromeOptions": {
                        "w3c": True,
                        "args": ["ignore-certificate-errors", "ignore-ssl-errors=yes"],
                    }
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts("chrome", google_cert_opts),
                )
            elif browser == "firefox_k8s":
                firefox_cert_opts = {
                    "acceptInsecureCerts": True,
                    "acceptSslCerts": True,
                }
    
                self.browser = webdriver.Remote(
                    command_executor="http://selenium-hub.selenium.svc.cluster.local:4444/wd/hub",
                    desired_capabilities=self.get_grid_opts(
                        "firefox", firefox_cert_opts
                    ),
                )
    
            elif browser == "edge":
                if debug:
                    self.browser = Edge(
                        executable_path="msedgedriver",
                        desired_capabilities=self.get_local_edge_opts(headless),
                        service_args=["--verbose", "--log-path=selenium.log"],
                    )
                else:
                    command_executor = EdgeRemoteConnection(
                        "https://ondemand.saucelabs.com:443/wd/hub"
                    )
                    options = EdgeOptions()
                    options.use_chromium = True
                    self.browser = webdriver.Remote(
                        command_executor=command_executor,
                        options=options,
                        desired_capabilities=self.get_sauce_edge_opts(browser_version),
                    )
    
            elif browser == "IE":
                if debug:
                    self.browser = webdriver.Ie(capabilities=self.get_local_ie_opts())
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_ie_opts(browser_version),
                    )
            elif browser == "safari":
                if debug:
                    self.browser = webdriver.Safari()
                else:
                    self.browser = webdriver.Remote(
                        command_executor="https://ondemand.saucelabs.com:443/wd/hub",
                        desired_capabilities=self.get_sauce_safari_opts(
                            browser_version
                        ),
                    )
            else:
                raise Exception(
                    "No valid browser found.! expected=[firefox, chrome, safari], got={}".format(
                        browser
                    )
                )
        except Exception as e:
            raise e
    
        try:
            self.browser_session = self.browser.session_id
>           self.login_to_splunk(*self.cred)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:207: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f23397317e0>
cred = ('admin', 'Chang3d!')

    def login_to_splunk(self, *cred):
        try:
>           login_page = LoginPage(self)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/base_test.py:444: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397320b0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f23397317e0>

    def __init__(self, ucc_smartx_selenium_helper):
        """
        :param ucc_smartx_selenium_helper: Fixture with selenium driver, urls(web, mgmt) and session key
        """
    
>       super().__init__(ucc_smartx_selenium_helper, ucc_smartx_rest_helper=None)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/login.py:33: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397320b0>
ucc_smartx_selenium_helper = <pytest_splunk_addon_ui_smartx.base_test.SeleniumHelper object at 0x7f23397317e0>
ucc_smartx_rest_helper = None, open_page = True

    def __init__(
        self, ucc_smartx_selenium_helper, ucc_smartx_rest_helper, open_page=True
    ):
        """
        :param ucc_smartx_selenium_helper: The selenium webdriver
        :param ucc_smartx_rest_helper: Splunk web & management url. {"web": , "mgmt": }
        """
        if ucc_smartx_selenium_helper:
            self.browser = ucc_smartx_selenium_helper.browser
            self.splunk_web_url = ucc_smartx_selenium_helper.splunk_web_url
            if open_page:
>               self.open()

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <pytest_splunk_addon_ui_smartx.pages.login.LoginPage object at 0x7f23397320b0>

    def open(self):
        """
        Abstract Method. Open the page
        """
>       self.browser.get(self.splunk_web_url)

/usr/local/lib/python3.10/dist-packages/pytest_splunk_addon_ui_smartx/pages/page.py:43: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="630a0fe67f83466d9953cf687e83a3b5")>
url = 'http://splunk:8000/'

    def get(self, url):
        """
        Loads a web page in the current browser session.
        """
>       self.execute(Command.GET, {'url': url})

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/webdriver.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <selenium.webdriver.remote.webdriver.WebDriver (session="630a0fe67f83466d9953cf687e83a3b5")>
driver_command = 'get', params = {'url': 'http://splunk:8000/'}

    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 0x7f2339730940>
response = {'status': 500, 'value': '{"value": {"stacktrace": "\\tGetHandleVerifier [0x0079CE43+45171]\\n\\t(No symbol) [0x007290...ge": "unknown error: net::ERR_NAME_NOT_RESOLVED\\n  (Session info: chrome=117.0.5938.63)", "error": "unknown error"}}'}

    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.WebDriverException: Message: unknown error: net::ERR_NAME_NOT_RESOLVED
E         (Session info: chrome=117.0.5938.63)

/usr/local/lib/python3.10/dist-packages/selenium/webdriver/remote/errorhandler.py:242: WebDriverException