// Check that a header is bottom-aligned with its section container, allowing a 2% vertical tolerance awaitexpect(headerLocator).toBeVerticallyAlignedWith(parentLocator, VerticalAlignment.Bottom, { tolerancePercent:2 });
Example
// Check that a header is vertically centered within its section container (default options) awaitexpect(headerLocator).toBeVerticallyAlignedWith(parentLocator, VerticalAlignment.Center);
Asserts that the target element is vertically aligned with the specified container according to the given alignment type.
Top alignment (
alignment = 'top'
):Center alignment (
alignment = 'center'
):Bottom alignment (
alignment = 'bottom'
):