protractor-net icon indicating copy to clipboard operation
protractor-net copied to clipboard

Protractor.Net doesn't work with Angular 14?

Open arnonax-tr opened this issue 2 years ago • 0 comments

I took a very simple demo Angular 14 app (from a short course I took), and tried to see if I can use Protractor.Net with it. However, the following simple code fails with the below exception. There's so little going on here that I can't see how this library can work for anyone using Angular 14. Am I missing something?

This is code:

var chromeDriver = new ChromeDriver();
var driver = new NgWebDriver(chromeDriver);
driver.Url = "http://localhost:4200/home";

And this is the exception:

OpenQA.Selenium.WebDriverTimeoutException: script timeout
  (Session info: chrome=104.0.5112.81)
   at OpenQA.Selenium.WebDriver.UnpackAndThrowOnError(Response errorResponse)
   at OpenQA.Selenium.WebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.WebDriver.ExecuteScriptCommand(String script, String commandName, Object[] args)
   at OpenQA.Selenium.WebDriver.ExecuteAsyncScript(String script, Object[] args)
   at Protractor.NgWebDriver.ExecuteAsyncScript(String script, Object[] args)
   at Protractor.NgWebDriver.WaitForAngular()
   at Protractor.NgWebDriver.FindElement(By by)
   at ConsoleApp1.Program.Main(String[] args) in C:\temp\ConsoleApp1\ConsoleApp1\Program.cs:line 21

It happens consistently (Chrome and ChromeDriver are version 104).

Note that I got exactly the same exception in a much more complex, real application on which I tried it first, and got this small repro after thorough investigation.

arnonax-tr avatar Aug 10 '22 14:08 arnonax-tr