Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8582927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:25:00+00:00 2026-06-11T21:25:00+00:00

In java I use code like this to grab a list of WebElements with

  • 0

In java I use code like this to grab a list of WebElements with the same identifier:

@FindBy(how = How.CLASS_NAME, using = "name")
private List<WebElement> names;

Now, I’m using c# and I’m trying to do the same thing using:

[FindsBy(How = How.ClassName, Using = "name")]
private List<IWebElement> names;

However, this gives the exception:

System.ArgumentException: Object of type
‘Castle.Proxies.IWrapsElementProxy_1’ cannot be converted to type
‘System.Collections.Generic.List`1[OpenQA.Selenium.IWebElement]’.

I’ve tried FindAllBy and FindBys, however those do not seem to be valid. Is there anyway I can do this besides

names = getDriver().findElements(By.ClassNames("..."))?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:25:01+00:00Added an answer on June 11, 2026 at 9:25 pm

    As of 2.29.0 of the .NET bindings, this is now no longer true. The FindsBy attribute now will find individual elements or collections of elements. Note that the collection field or property decorated by the FindsBy attribute must be of type IWebElement or IList<IWebElement> in order to be populated by the PageFactory. Any other type will throw an exception.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My java code looks like this: class xHandler { private Channel _channel; // Methods...
I have Java code and TeX documents in the same project. I use TeXlipse
Why can't I use code like this? <?php class NoConstructor { } class ChildWithConstructor
I'm trying to use a Java object in Coldfusion using the CreateObject function. This
Question 1: I am studying Android service and often see code like this: private
Just like back in the pre-generics Java days, I write code like this: UIView
I have a Java code like this: public static byte[] generateMac(byte[] key, byte[] cipherText,int
The Java - WebDriverBackedSelenium exporter I found generates code like this: selenium.open(/); selenium.type(Password, blah);
I use Eclipse to write Java code and use DropBox to sync my code
I am starting to use some Java code which was written by someone else.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.