位置を取得
ページ上の要素の位置を決定します。点 (0, 0) はページの左上隅を表します。
使用方法
$(selector).getLocation(prop)
パラメータ
| 名前 | タイプ | 詳細 | 
|---|---|---|
| prop | 文字列 | アサーションを容易にするために、結果値を直接取得するための "x" または "y" を指定できます。 | 
例
getLocation.js
it('should demonstrate the getLocation function', async () => {
    await browser.url('http://github.com');
    const logo = await $('.octicon-mark-github')
    const location = await logo.getLocation();
    console.log(location); // outputs: { x: 150, y: 20 }
    const xLocation = await logo.getLocation('x')
    console.log(xLocation); // outputs: 150
    const yLocation = await logo.getLocation('y')
    console.log(yLocation); // outputs: 20
});