Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

'[ng:app] not a valid selector #36

Closed
peterktung opened this issue Mar 10, 2017 · 3 comments
Closed

'[ng:app] not a valid selector #36

peterktung opened this issue Mar 10, 2017 · 3 comments

Comments

@peterktung
Copy link

I keep getting the following error on my tests:

Selenium::WebDriver::Error::WebDriverError:
       unexpected response, code=500, content-type=""
       Error: Error from waitForAngular: Failed to execute 'querySelectorAll' on 'Document': '[ng:app]' is not a valid selector.

I removed both trySelector('[ng:app]') and trySelector('[ng:controller]') in https://github.com/angular/blocking-proxy/blob/master/lib/client_scripts/wait.js#L111, and my tests are working now.

I don't know enough to say if those trySelector calls need to be there or not. But perhaps the method should also be surrounded by a try-catch like the tryEl method?

@heathkit
Copy link
Contributor

Turns out those selectors aren't escaped properly. Are you using BlockingProxy directly, or are you using it through Protractor? Also, is this an AngularJS app? I'm guessing most people haven't hit this code path yet since they tend to either have the app on document.body or are passing a root element.

@heathkit
Copy link
Contributor

Turns out this was fixed upstream in Protractor, that's what I get for just copying the client side scripts. angular/protractor#4021

@peterktung
Copy link
Author

Thanks for the quick turnaround! I'm using Blocking Proxy directly, and I only have the ng-controllerdirective for a widget.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants