// Checks that the element matches the container's size, with up to 5% tolerance in width and height awaitexpect(elementLocator).toHaveSameSizeAs(containerLocator, { tolerancePercent:5 });
Example
// Checks that the element has exactly the same width and height as its container using default alignment options awaitexpect(elementLocator).toHaveSameSizeAs(containerLocator);
Asserts that the target element has the same width and height as the specified container element.