Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
623 views
in Technique[技术] by (71.8m points)

c# - Cannot find WebDriverWait class in OpenQa Selenium 3.7

I've just started a new project in Selenium with Webdriver 3.7 and I was looking for the Webdriverwait class in the OpenQA.Selenium.Support.UI namespace where I remeber it being, however I can't seem to find it anywhere.

I installed Selenium on my VS 2017 using the NuGet manager and installed both Selenium.Webdriver and Selenium.Support packages.

I have also put the OpenQA.Selenium.Support.UI namespace in the code with the using keyword.

I'm sure it must be something obvious that I'm missing, but it's driving me crazy.

does anyone have any ideas?

EDIT: After trying to figure this out a bit more I've found that I only have access to part of the classes available in the OpenQA.Selenium.Support.UI namespace. There are three classes and two interface defined in that namespace that I cannot seem to access, these are: DefaultWait, SystemClock, WebDriverWait, IClock and IWait.

So it can't be a problem with there not being a reference to the OpenQA.Selenium.Support.UI namespace, since the rest of the classes in there I can access just fine.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As per the Documentation WebdriverWait class is in OpenQA.Selenium.Support.UI namespace only.

Inheritance Hierarchy :

  1. System.Object
  2. OpenQA.Selenium.Support.UI.DefaultWait<IWebDriver>
  3. OpenQA.Selenium.Support.UI.WebDriverWait

Namespace : OpenQA.Selenium.Support.UI


Assembly : WebDriver.Support (in WebDriver.Support.dll) Version: 3.1.0


Snapshot :

WebDriverWait


Snapshot :

OpenQA.Selenium.Support.UI Namespace


Update :

As you are still unable to access the classes I would suggest to uninstall & again install the Selenium.Webdriver and Selenium.Support packages.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...