Asserts that the target element is fully contained within the specified container element,
allowing for an optional margin of tolerance.
The check ensures that all sides of the target element (top, bottom, left, right)
are strictly within the bounds of the container, with an optional offset based on a
percentage of the container's dimensions.
// Verify that the modal content is fully inside its container with a 2% tolerance awaitexpect(modalContentLocator).toBeInside(parentLocator, { tolerancePercent:2 });
Example
// Verify that the modal content is strictly inside its container without any tolerance awaitexpect(modalContentLocator).toBeInside(parentLocator);
Asserts that the target element is fully contained within the specified container element, allowing for an optional margin of tolerance.
The check ensures that all sides of the target element (top, bottom, left, right) are strictly within the bounds of the container, with an optional offset based on a percentage of the container's dimensions.