Monday, 3 April 2017

Why we need protractor?

Angular JS applications have some extra HTML attributes like ng-repeater, ng-controller, ng-model., etc. which are not included in Selenium locators. Selenium is not able to identify those web elements using Selenium code. So, Protractor on the top of Selenium can handle and controls those attributes in Web Application.

I have tried below example and i am able to identify ng element with selenium. Can someone please why we need protractor to deal with ng elemnents.

driver.get("https://angularjs.org"); driver.findElement(By.xpath("//*[@ng-model='yourName']")).sendKeys("Tripti");



via Dipak

No comments:

Post a Comment