BoDi.ObjectContainerException : Interface cannot be resolved: OpenQA.Selenium.IWebDriver

4,374 views
Skip to first unread message

shiva kumar

unread,
Oct 9, 2016, 2:24:17 PM10/9/16
to SpecRun
Hi 

When I ran my  specflow feature with steps in vs2015 ,I got this message.
How can i resolve this?

BoDi.ObjectContainerException : Interface cannot be resolved: OpenQA.Selenium.IWebDriver

Stephen McCafferty

unread,
Oct 10, 2016, 9:09:27 AM10/10/16
to SpecRun
This is caused by the web driver not being registered with the object container.

You might want to take a look at this article; there is an example of registering an interface with the object container at the end. In short, the essential missing piece of your puzzle is:

objectContainer.RegisterInstanceAs<IMyInterface>(myClass);

Reply all
Reply to author
Forward
0 new messages