zplCore.comzplCore.com

ElementAssertions<TSelf, TElement>

public abstract class ElementAssertions<TSelf, TElement>

Assertions shared by text and barcode elements: position and layout. When the element could not be selected (inside a ZplAssertionScope) every further assertion is skipped.

Properties

PropertyTypeDescription
And { get; }LabelAssertionsBack to the label for more assertions.
Element { get; }TElementThe selected element (null when the selection failed inside a scope).

Methods

Method SignatureReturnsDescription
# DoesNotOverlap(string other)TSelfThe element's ink does not overlap any element matched by other (text content or barcode selector).
# DoesNotOverlapAnything()TSelfThe element's ink does not overlap any other element.
# IsAbove(string other)TSelfThe element ends above the top of every element matched by other.
# IsAt(double xMm, double yMm, double toleranceMm = 0.5)TSelfThe element's top-left corner is at (xMm, yMm) ± toleranceMm.
# IsBelow(string other)TSelfThe element starts below the bottom of every element matched by other.
# IsInside(double xMm, double yMm, double widthMm, double heightMm)TSelfThe element lies completely inside the area (mm from the top-left label corner).
# IsWithinLabel(double marginMm = 0)TSelfThe element lies completely on the label, at least marginMm from every edge.