你好
我以前在python上创建了一些selenium脚本,它们运行得很好,但不知道它为什么不能在网站上运行。 我试图点击一个元素,当“discus”被加载到那个网站时出现。 discus是网站上的评论部分,在网站加载后加载。在
因此,我使用了sleep方法,但它不起作用,所以我尝试使用python IDLE逐个执行代码行,这样我就可以运行locate code一次discus comment section完全可用,但仍然得到相同的错误。”Webdriver无法定位元素“
这是我的密码。在
import selenium
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
browser = webdriver.Chrome('E:\\ChromeDriver\\chromedriver_win32\\chromedriver.exe')
browser.get('https://www.eloanus.com/customers-review')
dicuss = browser.find_element_by_class_name('textarea')
print(dicuss)
错误,我得到了。在
我附上了从那个网站上检查元素(类)的截图。在
我是编程新手,如果有任何帮助,我将不胜感激。在
有多个iframes,因此在需要交互之前必须切换到它。在
一旦你把司机的控制权切换到默认值,这是一个很好的做法。在
代码:
希望这有帮助。在
要将字符序列发送到discus comment部分,您需要:
代码块:
浏览器快照:
相关问题 更多 >
编程相关推荐