同样的代码,在headless模式下不可交互,在浏览器UI界面中可以交互
request = <FixtureRequest for <Function test_lsh_t6901_02__build_a_new_segment_with_1st_party_taxonomy_nodes[v216insight]>> scenario = <pytest_bdd.feature.Scenario object at 0x11241fd30> step = <pytest_bdd.feature.Step object at 0x1124db070> step_func = <function step_verify_save_as_audience_button at 0x111f42d30> steps/ui/lsh/audience_steps.py:48: in step_verify_save_as_audience_button audience_build_page_input_save_file_name(driver, generateFileName) driver = <selenium.webdriver.chrome.webdriver.WebDriver (session="886349d9f8a505f1b85c137a178957b7")> generateFileName = 'Automatic' get_lsh_target_env_config = <configparser.ConfigParser object at 0x112533880> module = 'Audience' steps/ui/lsh/pages/audience_page.py:73: in audience_build_page_input_save_file_name utils.type_text(driver, filename, By.CLASS_NAME, _CLASS_NAME_INPUT_AUDIENCE_FILENAME) driver = <selenium.webdriver.chrome.webdriver.WebDriver (session="886349d9f8a505f1b85c137a178957b7")> elements = [<selenium.webdriver.remote.webelement.WebElement (session="886349d9f8a505f1b85c137a178957b7", element="d8d04f95-c4f0-4ece-bb5e-cd5c49b2ab84")>] filename = 'Automatic' size = 1 ui/helpers/utils.py:63: in type_text el.send_keys(text) by_type = 'class name' driver = <selenium.webdriver.chrome.webdriver.WebDriver (session="886349d9f8a505f1b85c137a178957b7")> el = <selenium.webdriver.remote.webelement.WebElement (session="886349d9f8a505f1b85c137a178957b7", element="d8d04f95-c4f0-4ece-bb5e-cd5c49b2ab84")> locator = 'content' text = 'Automatic' env/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py:477: in send_keys self._execute(Command.SEND_KEYS_TO_ELEMENT, self = <selenium.webdriver.remote.webelement.WebElement (session="886349d9f8a505f1b85c137a178957b7", element="d8d04f95-c4f0-4ece-bb5e-cd5c49b2ab84")> value = ('Automatic',) env/lib/python3.9/site-packages/selenium/webdriver/remote/webelement.py:633: in _execute return self._parent.execute(command, params) command = 'sendKeysToElement' params = {'id': 'd8d04f95-c4f0-4ece-bb5e-cd5c49b2ab84', 'sessionId': '886349d9f8a505f1b85c137a178957b7', 'text': 'Automatic', 'value': ['A', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c']} self = <selenium.webdriver.remote.webelement.WebElement (session="886349d9f8a505f1b85c137a178957b7", element="d8d04f95-c4f0-4ece-bb5e-cd5c49b2ab84")> env/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py:321: in execute self.error_handler.check_response(response) driver_command = 'sendKeysToElement' params = {'id': 'd8d04f95-c4f0-4ece-bb5e-cd5c49b2ab84', 'text': 'Automatic', 'value': ['A', 'u', 't', 'o', 'm', 'a', 't', 'i', 'c']} response = {'status': 400, 'value': '{"value":{"error":"element not interactable","message":"element not ' 'interactable\\n (Session info: headless '
------------------------- A little Progress a day makes you a big success... ----------------------------