使用铬时的硒“selenium.common.exceptions.NoSuchElement
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element{"method":"id","selector":"window1"(Session info: chrome=63.0.3239.108(Driver info: chromedriver=2.34.522913(36222509aa6e819815938cbf2709b4849735537c), platform=Linux 4.10.0-42-generic x86_64)
from selenium import webdriverfrom selenium.webdriver.common.action_chains import ActionChainsimport time browser = webdriver.Chrome()browser.set_window_size(640, 480)browser.get(' implicitly_wait(10)canvas = browser.find_element_by_id("window1")canvas.click()while (True): action = ActionChains(browser) action.move_to_element(canvas).perform() canvas.click() canvas.send_keys("q")
相关分类