我正在尝试使用 python 在 Selenium webdriver 中使用 click 命令。但我收到以下错误。有人能帮我吗?
Traceback (most recent call last):
File "C:\Users\vikram\workspace\LDC\test.py", line 13, in <module>
driver.find_elements_by_link_text("MISCQA Misc Tests").click()
AttributeError: 'list' object has no attribute 'click'
这是我的程序
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.support.ui import WebDriverWait
import config
url = config.config.get('url')
driver = webdriver.Ie()
driver.get(url)
driver.find_elements_by_link_text("MISCQA Misc Tests").click()
driver.close()
我想我错过了一些东西。请建议我