“目录不是空的”错误 – 使用火狐seleniumexcel VBA

我需要帮助,出现以下错误: 错误消息当我尝试运行以下代码时,它会一直提示“目录不为空”:

Dim driver As New SeleniumWrapper.WebDriver Dim By As New By, Assert As New Assert, Verify As New Verify, Waiter As New Waiter driver.Start "Firefox" 

我想在Firefox上运行我的seleniumtesting。 我正在使用Excel VBA来做到这一点。 这是可行的Chrome浏览器,但不是在Firefox。 谢谢!

SeleniumWrapper已弃用,不再支持。 它已被SeleniumBasic取代: https : //github.com/florentbr/SeleniumBasic/releases

用法示例:

 Dim driver As New Selenium.FirefoxDriver driver.Get "https://en.wikipedia.org/wiki/Main_Page" driver.FindElementById("searchInput") _ .SendKeys("champagne") _ .Submit driver.Quit