Skip to content

element.getSize

element.getSize(): Promise<{ width: number, height: number } | null>

Section titled “element.getSize(): Promise<{ width: number, height: number } | null>”

Retrieves the size of the element.

  • Returns a promise that resolves to an object containing the width and height of the element.
  • If the element is not visible, the method returns null.
describe('Test script', function () {
it('Test 1', async () => {
const element = await gf.get('.my-element');
const size = await element.getSize();
});
});