Adding couple notes to Niels’s great answer.

wraps WebDriverJS which is Javascript bindings – in other words, Protractor does interact with a browser through the WebDriver. Protractor provides a really convenient API and has some unique Angular-specific features, like Angular specific element locating strategies (by.model(), by.binding(), by.repeater()), automatic synchronization between Protractor and Angular that helps to minimize the use of explicit waits here and there; there is a built-in support of BrowserStack and SauceLabs, test parallelization and many more.

As an another advantage of transitioning to Protractor/JavaScript is that both the application and the test codebase would be written in the same language.

I’ve seen several teammates transitioning from Selenium/Java, Selenium/Python or Selenium/C# to Protractor/JavaScript. The common challenges and difficulties were:

  • understanding asynchronous test execution in general
  • Promises and Control Flow: when to resolve a promise and when not; how to pass promises around from function to function; when to use deferred and how to manually fulfill/reject a promise; using done() in Jasmine
  • tackling flaky end-to-end tests
  • test code design and organization – where and how to keep page objects, how to wrap page objects into each other



Source link https://sqa.stackexchange.com/questions/30010/-from-selenium-to-protractor

LEAVE A REPLY

Please enter your comment!
Please enter your name here