Page 1 of 1

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

Posted: Wed Apr 15, 2020 8:59 pm
by chirag7070solanki
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?

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

Posted: Thu Apr 16, 2020 12:42 am
by Vega
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