我试图在无头模式下双击使用selenium的网站上的选定元素,但是双击操作不起作用。我的chrome版本是72。任何帮助都将不胜感激。下面是我代码的相关部分。在
element = driver.find_element_by_id('player-forpost-html5').click()
time.sleep(5)
action = ActionChains(driver)
element_1 = driver.find_element_by_id('player-forpost-html5')
action.move_to_element(element_1)
action.double_click(element_1)
action.perform()
element_1.click()
对于无头chrome浏览器,您需要在chrome选项中提供窗口大小。在
请试试看,如果行得通请告诉我。在
相关问题 更多 >
编程相关推荐