I am trying to test a angular code using protractor. I am able to test the elements which are visible on html using element(by.id or by.css). I need a way to test the functions which are in the javascript file. Suppose when we click on a button on html that calls a function in javascript file which is what I want to test.
1
votes
1 Answers
0
votes
I think you have a scoping problem here. With protractor, you test your application from one end to another from an end-user perspective through the user interface opened in your browser by automating user actions - clicking, entering keys, hovering etc.
To test a function, you should look into AngularJS unit-testing.