Reputation: 101
I will be responsible for test automation for angular application. I know that we have a protractor tool but i prefer webdriver with java(feel better with this than javascript and protractor). May i use java with webdriver or i must do it using protractor because selenium will not handle it?
Upvotes: 3
Views: 1563
Reputation: 473763
Of course, you can still use the regular Java selenium bindings to test AngularJS applications. It's just that Protractor
is simply more suitable/convenient to use for specifically AngularJS applications because of the several unique things it provides:
by.model
, by.binding
, by.repeater
etcIt's also important to understand that Protractor
is actually a wrapper around the WebDriverJS
- JavaScript selenium bindings. And, as a side note, Protractor
can also be used to test non-angular apps (just turn the sync off).
There is also ngWebDriver
package that might actually be your solution:
We have taken JavaScript from Angular's Protractor project. While ngWebDriver perfectly compliments the Java version of WebDriver, it has to pass JavaScript up to the browser to inteoprate with Angular, and the Protractor project has done the hard work (including testing) to make that solid, and ngWebDriver benefits from that work.
Also see:
Upvotes: 2