在下面的代碼中,我遇到以下錯誤Set H2Headers = ch.FindElementByTag("h2"):
運行時錯誤 13:型別不匹配
Private ch As Selenium.ChromeDriver
Sub TestSelenium()
Set ch = New Selenium.ChromeDriver
ch.Start
ch.Get "https://en.wikipedia.org/wiki/Main_Page"
Dim H2Headers As Selenium.WebElements
Set H2Headers = ch.FindElementByTag("h2")
Debug.Print H2Headers.Count
End Sub
任何幫助,將不勝感激。
uj5u.com熱心網友回復:
使用以下更改:
FindElementsByTag代替FindElementByTag
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/516922.html
標籤:vba硒网络驱动程序
上一篇:--headerless和-silent模式之間的selenium區別
下一篇:如何在python中使用seleniumWeb驅動程式啟動chrome,而不是作為訪客,而是作為我的chrome組態檔?
