WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

What type of cast Im missing here when creating a List?

Open Saif4 opened this issue 7 years ago • 2 comments

Im trying to create a list and store the values in that list with this code: IList webElements = AccountWindowSession.FindElementsByTagName("ListItem");

But im getting this error:

Cannot implicitly convert type 'System.Collections.ObjectModel.ReadOnlyCollection<OpenQA.Selenium.Appium.Windows.WindowsElement>' to 'System.Collections.Generic.IList<OpenQA.Selenium.IWebElement>'. An explicit conversion exists (are you missing a cast?)

Can someone help?

Saif4 avatar May 22 '19 08:05 Saif4

var webElements = AccountWindowSession.FindElementsByTagName("ListItem");

MikeSifanele avatar May 23 '19 14:05 MikeSifanele

Thanks @MikeSifanele

Saif4 avatar May 27 '19 12:05 Saif4