Could not load type 'OpenQA.Selenium.Support.UI.WebDriverWait' in version 3.6.0 for C#
Meta -
OS: Windows 7
Selenium Version: 3.6.0
Browser: Chrome
Browser Version: 61.0.3163.100(64 bit)
Expected Behavior - Should be able use WebDriverWait class
Actual Behavior - Getting error: Could not load type 'OpenQA.Selenium.Support.UI.WebDriverWait' in version 3.6.0 for C#. I was also unable to find the WebDriverWait class in the package explorer in Visual Studio: Take a look at the follow SO : Question
Steps to reproduce - Upgrade to version 3.6.0 and user WebDriverWait class in C#
The WebDriverWait class has been moved into the main WebDriver assembly. To use WebDriverWait, you no longer need the support package. The namespace remained the same, so for the vast majority of users, this change was entirely transparent, since most projects that reference WebDriver.Support also reference WebDriver.
Hi @jimevans . Sorry for a stupid question, but am I right to have this fixed I can delete 'Selenium.Support' library from my installed packages? Will it solve an issue?
If WebDriverWait is the only class you use from the Selenium.Support.dll assembly, then yes, you can remove that package. However, there are other classes you may be using (like ExpectedConditions) that would require you to retain the reference.
Hi @jimevans , I have a 3rd party package that depends on Selenium.Support.dll, so I can't remove it. I have 3.8.0 of both Selenium and Selenium.Support.
How do I resolve this issue? I can't downgrade just Support because then I get conflicting references.
Edit: It looks like this change breaks all nuget packages that have a dependency on Selenium.Support lower than 3.6.0?
@jimevans, What would the new reference to the class be. I have been trying "using OpenQA.Selenium.WebDriver;" and also removing the reference but no success.
@aditki The namespace is still the same as when it was in the support assembly (OpenQA.Selenium.Support.UI). This was to facilitate as seamless a transition as possible.
@jimevans So, if both webdriver and support packages are installed, Using the same namespace is not gonna cause a problem? Because I am having one in WebDriver 3.14.0
No, as long as both packages are the same version, there will be no conflict. The class was moved from WebDriver.Support to WebDriver. If the issue is transitive dependencies (that is, you use other libraries that depend on the Selenium packages), you’ll need to get the other projects on which you depend to update their references accordingly.
@jimevans For what it's worth, tracking down that faulty transitive dependency and chasing the author to update was very difficult. While I can see the benefits of that migration method, I would sincerely ask that an alternative is found if this needs to happen again in future.
I had to run with a custom build of a 3rd party library fora few months!
@tboby I’m sorry you had to go to the extra effort.