Python无法按Xpath、ID和Nam找到元素

2024-10-01 19:27:46 发布

您现在位置:Python中文网/ 问答频道 /正文

enter image description here

enter image description here

我最近才开始使用Python,我正试图在搜索栏中输入一些内容,如图所示。在

我尝试过Xpath、Name和ID,但都不管用。它看起来很直接,但我一直收到错误消息。在

我试过:

driver.find_element_by_xpath('//*[@id="PRCSRUNCNTL_RUN_CNTL_ID"]')
driver.find_element_by_name("PRCSRUNCNTL_RUN_CNTL_ID")
driver.find_element_by_id("win0divPRCSRUNCNTL_RUN_CNTL_ID")

Xpath的错误消息:

enter image description here


Tags: runnameid消息内容bydriver错误

热门问题