Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/google-chrome/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google chrome 使用chrome驱动程序获取selenium元素列表失败_Google Chrome_Selenium_Selenium Webdriver - Fatal编程技术网

Google chrome 使用chrome驱动程序获取selenium元素列表失败

Google chrome 使用chrome驱动程序获取selenium元素列表失败,google-chrome,selenium,selenium-webdriver,Google Chrome,Selenium,Selenium Webdriver,已经在谷歌上搜索了几个小时,但就是无法使其正常工作,尝试了无数次更改。最近我能得到的是错误消息 其他信息:无法强制转换类型为的对象 'System.Collections.ObjectModel.ReadOnlyCollection'1[OpenQA.Selenium.IWebElement]' 输入“OpenQA.Selenium.Chrome.ChromeBelement” 你用什么语言?你没说。。。它看起来有点像C,但不太像。错误基本上是说.findElements返回元素的集合,但您已经

已经在谷歌上搜索了几个小时,但就是无法使其正常工作,尝试了无数次更改。最近我能得到的是错误消息

其他信息:无法强制转换类型为的对象 'System.Collections.ObjectModel.ReadOnlyCollection'1[OpenQA.Selenium.IWebElement]' 输入“OpenQA.Selenium.Chrome.ChromeBelement”


你用什么语言?你没说。。。它看起来有点像C,但不太像。错误基本上是说.findElements返回元素的集合,但您已经将myList定义为元素的单个实例。如果你在谷歌上搜索你的语言的.findElements教程,你应该能找到一些简单的例子来说明如何正确地声明它

Dim mylist As ChromeWebElement = driver.findElements(By.TagName("a"))