Add a locator to this instance of ProtractorBy. This locator can then be
used with element(by.
A script to be run in the context of the browser. This script will be passed an array of arguments that begins with the element scoping the search, and then contains any args passed into the locator. It should return an array of elements.
Usage: {{status}} var status = element(by.binding('{{status}}'));
Usage: element(by.model('user'));
Usage:
// Returns the DIV for the second cat. var secondCat = element(by.repeater("cat in pets").row(2)); // Returns the SPAN for the first cat's name. var firstCatName = element( by.repeater("cat in pets").row(1).column("{{cat.name}}")); // Returns a promise that resolves to an array of WebElements from a column var ages = element( by.repeater("cat in pets").column("{{cat.age}}")); // Returns a promise that resolves to an array of WebElements containing // all rows of the repeater. var rows = element(by.repeater("cat in pets"));
Usage: element(by.select("user"));
Usage: element(by.selectedOption("user"));
Usage: element(by.textarea("user"));