【发布时间】:2015-03-02 10:31:58
【问题描述】:
如何将以下代码从 Java 重写为 C#?
public List<IWebElement> findAll (By by)
{
return driver.FindElements(by);
}
如果我复制粘贴,我会收到以下错误:
cannot implicitly convert type 'System.Collections.ObjectModel.ReadOnlyCollection<OpenQA.Selenium.IWebElement>' to 'System.Collections.Generic.List<OpenQA.Selenium.IWebElement>'
谢谢!
【问题讨论】: