Questions? Ask anytime
mail / hangout (sam.vloeberghs)
follow / tweet @samvloeberghs
connect
Play around: example project: Github repo
vs
A way to measure the possible sharp angles of your Angular project
All operations are async!
element(by.id('addbutton')); //
element(by.css('some-css')); //
element(by.css('.special')); //
element(by.binding('first')); // {{first}}
element(by.model('second')); //
element(by.css('my-css')); // is the same as
$('my-css'); // short cut selector ( css selectors )
Protractor documentation : locators
element.all(by.css('.selector')).then((elements) => {
/* elements is an array of ElementFinders. */
});
/* Number of elements */
element.all(locator).count();
/* Get by index (starting at 0) */
element.all(locator).get(index);
/* First and last */
element.all(locator).first();
element.all(locator).last();
Protractor documentation : multiple elements
var el = element(locator);
/* Click on the element */
el.click();
/* Send keys to the element (usually an input) */
el.sendKeys('my text');
/* Clear the text in an element (usually an input) */
el.clear();
/* Get the value of an attribute, for example, get the value of an input */
el.getAttribute('value');
Protractor documentation : actions
Mostly based on the styleguide by Carmen Popoviciu
Feature: This feature describes the scenarios of the set new password
part of our authentication component
Scenario Outline: The user is setting a new password ( valid link )
Given user clicks the valid set new password link
And '<password>' is the provided new password
And '<repeatPassword>' is the repeated new password
When submitting the set new password form
Then the set new password form is validated '<valid>'
Examples:
| password | repeatPassword | valid |
| | | false |
| 123 | | false |
...
| 12345678 | 12345678 | true |
Gherkin documentation : docs
export SAUCE_USERNAME=samvloeberghs
export SAUCE_ACCESS_KEY=xxxx
sauceUser: process.env.SAUCE_USERNAME,
sauceKey: process.env.SAUCE_ACCESS_KEY
8-9/12/2016 - Holiday Inn - Ghent Expo
1 day high level workshop
1 day conference
Questions? Ask anytime
mail / hangout (sam.vloeberghs)
follow / tweet @samvloeberghs
connect