我的selenium - python代码中的问题是什么?



显示的错误:

GetHandleVerifier [0x00CBDCE3+50899]
(No symbol) [0x00C4E111]
(No symbol) [0x00B55588]
(No symbol) [0x00B7570C]
(No symbol) [0x00B71471]
(No symbol) [0x00B6F479]
(No symbol) [0x00BA1FFE]
(No symbol) [0x00BA1CEC]
(No symbol) [0x00B9B6F6]
(No symbol) [0x00B77708]
(No symbol) [0x00B7886D]
GetHandleVerifier [0x00F23EAE+2566302]
GetHandleVerifier [0x00F592B1+2784417]
GetHandleVerifier [0x00F5327C+2759788]
GetHandleVerifier [0x00D55740+672048]
(No symbol) [0x00C58872]
(No symbol) [0x00C541C8]
(No symbol) [0x00C542AB]
(No symbol) [0x00C471B7]
BaseThreadInitThunk [0x74E200F9+25]
RtlGetAppContainerNamedObjectPath [0x76FA7BBE+286]
RtlGetAppContainerNamedObjectPath [0x76FA7B8E+238]

我代码:

##Importing Libraries:
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
driver = webdriver.Chrome(executable_path=r"C:UsersKanishk JainDownloadschromedriver_win32chromedriver.exe")
driver.maximize_window()
driver.get("https://google.com")
driver.find_element_by_name("q").send_keys(Keys.ENTER)
driver.find_element_by_name("btnK").send_keys(Keys.ENTER)
driver.close()

详细信息:-上面是错误的,在底部是我的主代码没有运行,我不知道为什么,请检查,请检查,请检查

如果你正在尝试实现谷歌搜索,在你的代码下面一行是导致问题

driver.find_element_by_name("btnK").send_keys(Keys.ENTER)

你不需要点击"谷歌搜索"按钮开始搜索

search = driver.driver.find_element_by_name('q')
search.send_keys('man city vs southampton')
search.send_keys(Keys.ENTER)
driver.close()

我只是使用send_keys()发送搜索查询,之后我再次通过发送ENTER调用相同的方法来开始搜索

相关内容

  • 没有找到相关文章

最新更新