<selenium.webdriver.remote.webelement.WebElement (session="E29EA599-6852-40E6-BE20-3755D338822B", element="node-74357A02-C77D-49AE-9F7C-F1C267451302")> {'x': 736, 'y': 833} {'height': 28, 'width': 28} <selenium.webdriver.remote.webelement.WebElement (session="E29EA599-6852-40E6-BE20-3755D338822B", element="node-3181FDA9-52AB-4A33-A3A1-5F1E4E5C30D9")> {'x': 770, 'y': 833} {'height': 28, 'width': 28} <selenium.webdriver.remote.webelement.WebElement (session="E29EA599-6852-40E6-BE20-3755D338822B", element="node-6CC0AEF1-0569-4339-BFE1-E4B9B66BBF49")> {'x': 804, 'y': 833} {'height': 28, 'width': 28} <selenium.webdriver.remote.webelement.WebElement (session="E29EA599-6852-40E6-BE20-3755D338822B", element="node-6D775505-8ED2-4694-B5C5-A10768A5311B")> {'x': 838, 'y': 833} {'height': 28, 'width': 28} <selenium.webdriver.remote.webelement.WebElement (session="E29EA599-6852-40E6-BE20-3755D338822B", element="node-C292CECC-F6C0-4C76-90FE-7E7F7D1A6A67")> {'x': 872, 'y': 833} {'height': 28, 'width': 28}
上面五个元素,知道了坐标和 size,怎么写点击的语句呢?我用下面的语句一直没反应,
ActionChains(driver).move_to_element_with_offset(eles[1],eles[1].size['hiegth']/2,eles[1].size['width']/2) ActionChains(driver).click() ActionChains(driver).perform()
1
jahan OP 觉得是不是要在屏幕上选个点来点击? pywin32 ?怎么用呢?
actionchains 是不是个大坑啊 |