* Creates a condition that will wait for the current page's title to match the * given value. * * @param {string} title The expected page title. * @return {!Condition } The new condition.
(title)
| 136 | * @return {!Condition<boolean>} The new condition. |
| 137 | */ |
| 138 | function titleIs(title) { |
| 139 | return new Condition('for title to be ' + JSON.stringify(title), function (driver) { |
| 140 | return driver.getTitle().then(function (t) { |
| 141 | return t === title |
| 142 | }) |
| 143 | }) |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * Creates a condition that will wait for the current page's title to contain |