* {{> grabWebElement }} *
(locator)
| 1027 | * |
| 1028 | */ |
| 1029 | async grabWebElement(locator) { |
| 1030 | const elements = await this._locate(locator) |
| 1031 | if (elements.length === 0) { |
| 1032 | throw new ElementNotFound(locator, 'Element') |
| 1033 | } |
| 1034 | return new WebElement(elements[0], this) |
| 1035 | } |
| 1036 | |
| 1037 | /** |
| 1038 | * Set [WebDriver timeouts](https://webdriver.io/docs/timeouts.html) in realtime. |