Selenium WebDriver for AngularJs apps

I have been recently using Protractor for about 6 months now and while evaluating tools for AngularJs apps, I haven’t found anything good in Java (Since we have already good framework setup using Java Bindings) expect for Paul Hammant’s idea of having AngularJs specific locator as a library in Java started back in 2013 and then it was not maintained. So, I had to choose Protractor. His article.

Thinking that, just because the locators are Angular specific why to go for a new tool and create and maintain another test framework in JavaScript. Proposed some new ideas to Paul and we decided to rewrite the library in a different way. well we came up with a simple ingenious idea, its just to reuse the Protractor’s js file.

“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.”

Protractor’s Library mainly depends on clientsidescripts for locators and we decided to use that. With series of commits earned commit rights to the repo.

Here is the Repository link – ngWebDriver

It may not be completely a replacement for Protractor, but yes serves purpose to automate with Angular locators.

If you feel something needs to be added to this library, please feel free to raise an issue.

1 thought on “Selenium WebDriver for AngularJs apps

  1. Am I understanding this correctly that this library allows to introspect Angular directives / bindings / scopes? Why this is needed in end to end testing? I’ve been using plain Selenium WebDriver for testing Angular apps for quite a while.

Leave a Comment