bbaia / protractor-net

The .NET port of Protractor, an E2E test framework for Angular apps
MIT License
115 stars 72 forks source link

If part of the application doesn't have angular, exception is thrown #59

Closed markoueis closed 7 years ago

markoueis commented 7 years ago

This might be expected design. However, could there be a way to just ignore all the angular stuff and default to regular webdriver if angular is not found on page as opposed to forcing tester to figure it out per page.

Maybe there already is a way but i don't know how to turn it on.

Thanks


Result StackTrace:  
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver.ExecuteScriptCommand(String script, String commandName, Object[] args)
   at OpenQA.Selenium.Remote.RemoteWebDriver.ExecuteAsyncScript(String script, Object[] args)
   at Protractor.NgWebDriver.WaitForAngular() in c:\Users\Bruno\Projets\GitHub\bbaia\protractor-net\src\Protractor\NgWebDriver.cs:line 367
   at Protractor.NgWebDriver.OpenQA.Selenium.ISearchContext.FindElements(By by) in c:\Users\Bruno\Projets\GitHub\bbaia\protractor-net\src\Protractor\NgWebDriver.cs:line 316
  ...
System.InvalidOperationException: System.InvalidOperationException: javascript error: angular could not be found on the window
JavaScript stack:
Error: angular could not be found on the window
    at eval (eval at executeAsyncScript (:438:5), <anonymous>:11:11)
    at eval (eval at executeAsyncScript (:438:5), <anonymous>:22:5)
    at executeAsyncScript (<anonymous>:438:26)
    at <anonymous>:454:29
    at callFunction (<anonymous>:346:33)
    at <anonymous>:356:23
    at <anonymous>:357:3
  (Session info: chrome=55.0.2883.87)
  (Driver info: chromedriver=2.26.436362 (5476ec6bf7ccbada1734a0cdec7d570bb042aa30),platform=Windows NT 10.0.10586 x86_64) (UnexpectedJavaScriptError).
bbaia commented 7 years ago

Yes, see issues #36 and #50