From 47d0ea5c7e57a20dd9707a0f5d26a670eab182e3 Mon Sep 17 00:00:00 2001 From: Sammy Jelin Date: Tue, 30 Jun 2015 12:15:06 -0700 Subject: [PATCH] chore(website): more protractor vs vanilla wd documentation --- docs/webdriver-vs-protractor.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/webdriver-vs-protractor.md b/docs/webdriver-vs-protractor.md index 4e6d79899..0d1e35ae7 100644 --- a/docs/webdriver-vs-protractor.md +++ b/docs/webdriver-vs-protractor.md @@ -27,3 +27,26 @@ tests. If you need the vanilla WebDriver `browser` object, you can access it via `browser.driver` + +Using ElementFinders +-------------------- + +In Protractor, you use the `element` function to find and interact with elements +through an `ElementFinder` object. This extends a WebDriver `WebElement` by +adding chaining and utilities for dealing with lists. See +[locators#actions](/docs/locators) for details. + +Jasmine Integration +------------------- + +Protractor uses [`jasminewd`](https://github.com/angular/jasminewd), which +wraps around jasmine's `expect` so that you can write: +```js +expect(el.getText()).toBe('Hello, World!') +``` +Instead of: +```js +el.getText().then(function(text) { + expect(text).toBe('Hello, World!'); +}); +```