用python+selenium测试android模拟器里面的webview,模拟器中app有个按钮,点击后会出现个div的弹出框(通过chrome inspect出来的),它是通过向已有的div里追加div。
我想用driver去获取div里面的元素的时候(比如driver.find_element_by_css_selector),提示:
File "D:\Miniconda3\envs\mypy36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 598, in find_element_by_css_selector
return self.find_element(by=By.CSS_SELECTOR, value=css_selector)
File "D:\Miniconda3\envs\mypy36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 978, in find_element
'value': value})['value']
File "D:\Miniconda3\envs\mypy36\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "D:\Miniconda3\envs\mypy36\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 241, in check_response
raise exce