【发布时间】:2020-12-05 13:38:02
【问题描述】:
Pic of the website's inspect element More in Depth pic 我的代码sn-p
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from time import sleep
import requests
///
excel = driver.find_element_by_name('Excel')
excel.click()
然后当我尝试运行它时,我会得到这个,任何帮助将不胜感激
NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="Excel"]"}
【问题讨论】:
-
可以分享一下网址吗?由于 Excel 可能嵌套在某些元素中,因此可能无法直接访问它。你可以参考这个链接stackoverflow.com/questions/50354465/…
-
我正在自动化一些工作流程,这个 URL 与我的工作有关,所以我不想分享,我相信你明白。我可以分享任何其他类型的信息吗?
标签: python selenium xpath css-selectors webdriverwait