IWebElement exists in both 'Ranorex.Plugin.WebDriver' and 'WebDriver'

Experiences, small talk, and other automation gossip.
chirag7070solanki
Posts: 2
Joined: Wed Apr 15, 2020 8:22 pm

IWebElement exists in both 'Ranorex.Plugin.WebDriver' and 'WebDriver'

Post by chirag7070solanki » Wed Apr 15, 2020 8:59 pm

I am trying to use some selenium libraries in my framework and getting below error. I have to use some Selenium Class Libraries which are not supported by Ranorex built in webdriver. I am getting below error.

The type 'IWebElement' exists in both 'Ranorex.Plugin.WebDriver, Version=9.1.1.0, Culture=neutral, PublicKeyToken=b798506b574ebc9a' and 'WebDriver, Version=3.141.0.0, Culture=neutral, PublicKeyToken=null' (CS0433)

Any suggestions on how to resolve this?

Vega
Posts: 222
Joined: Tue Jan 17, 2023 7:50 pm

Re: IWebElement exists in both 'Ranorex.Plugin.WebDriver' and 'WebDriver'

Post by Vega » Thu Apr 16, 2020 12:42 am

The compiler does not know which IWebElement you want to use between the reference you added and the built in Ranorex one. Which selenium references did you add and what do your using statements look like?

You can work with the selenium type IWebElement without adding any WebDriver reference to your project, so I would recommend removing what you do not need. IWebElement is located within OpenQA.Selenium, so removing this using statement will probably resolve your issue. Not sure if you saw this related forum post, but it may be helpful:

https://www.ranorex.com/forum/how-to-c- ... tml#p59421

hope this helps