1

I am trying to use Selenium's WebDriverWait together with Selenium PhantomJSDriver in my test . At the addition of the Selenium.WebDriver package, the class is usable ( under OpenQA.Selenium.Support.UI) When I add the Selenium.WebDriver.PhantomJS.Xplatform package, that becomes unusable.

If I switch the order of adding the above mentioned packages( managed both time via Nuget, using Rider), the Selenium.WebDriver will make the OpenQA.Selenium.PhantomJS unreachable . I have also added Selenium.Support as seen here : Cannot find WebDriverWait class in OpenQA.Selenium (C#), but that did not help.

Any suggestions on how could I use the WebDriverWait together with PhantomJS?

1 Answer 1

1

PhantomJS is deprecated for several years. Use headless chrome instead

ChromeOptions options = .ChromeOptions()
options.AddArguments("headless");

IWebDriver driver = new ChromeDriver(options));
Sign up to request clarification or add additional context in comments.

3 Comments

I was interested in PhantomJS because it did not imply having a browser installed. As far as I know, using ChromeDriver does require having Chrome browser installed, which is kind of a deal-breaker because I would want to run it on a machine which won't have it. Does it happen to know an alternative for that in Selenium?
@Daniel Have a look at HtmlUnitDriver
Thank you, I will check out that first ( also maybe selenium xvfb) . I will accept this as answer as it puts me on the right track.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.