Let’s see sample implementation of ngWebDriver Note – Along with above angular specific locators, we even can use selenium specific locators like id, name, className, css selector etc. If your application has only the above attributes allocated for the browser elements, then we can not use automate using selenium’s default locators like id, tagname, link etc.īut ngwebdriver has capability to identify the above elements directly, let’s seeīyAngular.repeater(str) - Angular web table Let’s list our few angular controls that are different than normal html elements
Using Selenium, we can automate all the possible actions that users do like clicking a button, entering text, selecting a value from dropdown and many more. Ngwebdriver basically taken the advantage of protractor and passing the javascript to browser to handle angular controls and also allows to write scripts in java language with out any synchronisation issue. Welcome to the Exciting world of Selenium In todays world, most of the applications are web-based applications which can be accessed through different browsers.
To over come above said issues while testing angular js controls with selenium and java, a library known as ngWebDriver came out to add features to selenium and can write the scripts in java In one of my earlier post Selenium java for angularJS apps, we have seen how we can use selenium webdriver and java to test angular js controls, but there are few limitations like we need to stick to a particular locator strategy (xpath or css) as selenium itself do not have locators method specific to angular controls, and sometime angular element’s actions lag behind the selenium line by line execution Solution – ngWebDriver