* {{> grabElementBoundingRect }}
(locator, prop)
| 2913 | * {{> grabElementBoundingRect }} |
| 2914 | */ |
| 2915 | async grabElementBoundingRect(locator, prop) { |
| 2916 | const res = await this._locate(locator, true) |
| 2917 | assertElementExists(res, locator) |
| 2918 | const el = usingFirstElement(res) |
| 2919 | |
| 2920 | const rect = { |
| 2921 | ...(await el.getLocation()), |
| 2922 | ...(await el.getSize()), |
| 2923 | } |
| 2924 | if (prop) return rect[prop] |
| 2925 | return rect |
| 2926 | } |
| 2927 | |
| 2928 | /** |
| 2929 | * Placeholder for ~ locator only test case write once run on both Appium and WebDriver. |
no test coverage detected