我试图向下滚动到python中的一个paticle元素,但事实并非如此工作。任何建议改进!在
Loc_Hours =self.driver.find_element_by_xpath("/html[1]/body[1]/div[1]/div[2]/div[1]/div[5]/div[1]/div[1]/div[1]/div[2]/div[1]/p[1]")
self.driver.execute_script("return arguments[0].scrollIntoView();", Loc_Hours)
Loc_Hours.text()
self.driver.execute_script("window.scrollBy(0, -150);")
你能试试这个吗:
我终于成功了!如果你有疑问就试试这个。在
这应该是有效的:
相关问题 更多 >
编程相关推荐