Selenium positioning elements are obscured layer solution

For occlusion

element=driver.find_element_by_xpath("//*[text()='后一页']")

driver.execute_script("arguments[0].click();", element)

 

Very easy to use, because direct injection js script, it is not on-screen instructions, but rather js operation, god-level operation ah



Author: a dimension
link: https: //www.jianshu.com/p/ef4d1693a24c
Source: Jane book
Jane book copyright reserved by the authors, are reproduced in any form, please contact the author to obtain authorization and indicate the source.

Guess you like

Origin www.cnblogs.com/ali-test/p/11348057.html