browser.executeScript doesn't see $scope

i am making a test with protractor for my angularjs app and i came accross the following problem

what i want to do is :

browser.executeScript('$scope.$apply')

i want to do this so that my screen updates/renders so i can get the values on screen

only when i do this it says : $scope is not defined

if have also tried multiple javascript render ways who also failed ,but i am not sure if i have used the right methods for that...

does anybody has the same problem or know how to fix this?

Answers


Perhaps you should be using an ng-view directive in your container markup to render html snippets or partials within your index page. Take a look at what ng-view can do (http://docs.angularjs.org/api/ngRoute.directive:ngView) :-)


Need Your Help

Grunt no longer livereloads

javascript angularjs gruntjs yeoman bower

I'm new to web development and I'm trying to build a small webapp. I used yoeman to set everything up and it did pretty well, angular installed perfectly and I installed angular-animate and jquery-ui

how to RegEx names like José González?

php regex

I am trying to RegEx person's names. José González is very difficult, i guess.