capybara-angular icon indicating copy to clipboard operation
capybara-angular copied to clipboard

app.injector is not a function (Selenium::WebDriver::Error::JavascriptError)

Open wiemann opened this issue 12 years ago • 4 comments

I am receiving the error

app.injector is not a function (Selenium::WebDriver::Error::JavascriptError)

in Angular 1.1.4 and jQuery 2.0.2. Any Idea what might cause this?

wiemann avatar Nov 07 '13 14:11 wiemann

Are you sure you used 'ng-app' somewhere in your body ?

mackwic avatar Nov 08 '13 11:11 mackwic

I made an update that also check for data-ng-app and x-ng-app (if that was your problem). Tell me if that fixes things.

Side note: I need this for HTML-friendly apps so this in an obligatory patch for my use case.

mackwic avatar Nov 08 '13 11:11 mackwic

@mackwic actually the ng-app attribute is used in my app, so $('*[ng-app]') properly returns it. What fails is the injection after selecting the element with jQuery.

wiemann avatar Nov 08 '13 12:11 wiemann

this one is probably caused by removal of angular(document).ready since 0.1.1 https://github.com/wrozka/capybara-angular/blob/v0.1.1/lib/capybara/angular/waiter.rb#L51

https://github.com/wrozka/capybara-angular/commit/baab0c383ed12ad9972d1e7139aa8ebb06d04636#diff-d408cea9ad24e4a12183b222790d77b5

Ahimgit avatar Dec 19 '15 15:12 Ahimgit