Class LocatorAssertionsImpl

java.lang.Object
com.microsoft.playwright.impl.AssertionsBase
com.microsoft.playwright.impl.LocatorAssertionsImpl
All Implemented Interfaces:
LocatorAssertions

public class LocatorAssertionsImpl extends AssertionsBase implements LocatorAssertions
  • Constructor Details

    • LocatorAssertionsImpl

      public LocatorAssertionsImpl(Locator locator)
    • LocatorAssertionsImpl

      private LocatorAssertionsImpl(Locator locator, boolean isNot)
  • Method Details

    • containsText

      public void containsText(String text, LocatorAssertions.ContainsTextOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element that contains the given text. You can use regular expressions for the value as well.

      **Usage**

      
       assertThat(page.locator(".title")).containsText("substring");
       

      If you pass an array as an expected value, the expectations are:

      1. Locator resolves to a list of elements.
      2. Elements from a **subset** of this list contain text from the expected array, respectively.
      3. The matching subset of elements has the same order as the expected array.
      4. Each text value from the expected array is matched by some element from the list.

      For example, consider the following list:

      Let's see how we can use the assertion:

      
       // ✓ Contains the right items in the right order
       assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
      
       // ✖ Wrong order
       assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
      
       // ✖ No item contains this text
       assertThat(page.locator("ul > li")).containsText(new String[] {"Some 33"});
      
       // ✖ Locator points to the outer list element, not to the list items
       assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});
       
      Specified by:
      containsText in interface LocatorAssertions
      Parameters:
      text - Expected substring or RegExp or a list of those.
    • containsText

      public void containsText(Pattern pattern, LocatorAssertions.ContainsTextOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element that contains the given text. You can use regular expressions for the value as well.

      **Usage**

      
       assertThat(page.locator(".title")).containsText("substring");
       

      If you pass an array as an expected value, the expectations are:

      1. Locator resolves to a list of elements.
      2. Elements from a **subset** of this list contain text from the expected array, respectively.
      3. The matching subset of elements has the same order as the expected array.
      4. Each text value from the expected array is matched by some element from the list.

      For example, consider the following list:

      Let's see how we can use the assertion:

      
       // ✓ Contains the right items in the right order
       assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
      
       // ✖ Wrong order
       assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
      
       // ✖ No item contains this text
       assertThat(page.locator("ul > li")).containsText(new String[] {"Some 33"});
      
       // ✖ Locator points to the outer list element, not to the list items
       assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});
       
      Specified by:
      containsText in interface LocatorAssertions
      Parameters:
      pattern - Expected substring or RegExp or a list of those.
    • containsText

      public void containsText(String[] strings, LocatorAssertions.ContainsTextOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element that contains the given text. You can use regular expressions for the value as well.

      **Usage**

      
       assertThat(page.locator(".title")).containsText("substring");
       

      If you pass an array as an expected value, the expectations are:

      1. Locator resolves to a list of elements.
      2. Elements from a **subset** of this list contain text from the expected array, respectively.
      3. The matching subset of elements has the same order as the expected array.
      4. Each text value from the expected array is matched by some element from the list.

      For example, consider the following list:

      Let's see how we can use the assertion:

      
       // ✓ Contains the right items in the right order
       assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
      
       // ✖ Wrong order
       assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
      
       // ✖ No item contains this text
       assertThat(page.locator("ul > li")).containsText(new String[] {"Some 33"});
      
       // ✖ Locator points to the outer list element, not to the list items
       assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});
       
      Specified by:
      containsText in interface LocatorAssertions
      Parameters:
      strings - Expected substring or RegExp or a list of those.
    • containsText

      public void containsText(Pattern[] patterns, LocatorAssertions.ContainsTextOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element that contains the given text. You can use regular expressions for the value as well.

      **Usage**

      
       assertThat(page.locator(".title")).containsText("substring");
       

      If you pass an array as an expected value, the expectations are:

      1. Locator resolves to a list of elements.
      2. Elements from a **subset** of this list contain text from the expected array, respectively.
      3. The matching subset of elements has the same order as the expected array.
      4. Each text value from the expected array is matched by some element from the list.

      For example, consider the following list:

      Let's see how we can use the assertion:

      
       // ✓ Contains the right items in the right order
       assertThat(page.locator("ul > li")).containsText(new String[] {"Text 1", "Text 3", "Text 4"});
      
       // ✖ Wrong order
       assertThat(page.locator("ul > li")).containsText(new String[] {"Text 3", "Text 2"});
      
       // ✖ No item contains this text
       assertThat(page.locator("ul > li")).containsText(new String[] {"Some 33"});
      
       // ✖ Locator points to the outer list element, not to the list items
       assertThat(page.locator("ul")).containsText(new String[] {"Text 3"});
       
      Specified by:
      containsText in interface LocatorAssertions
      Parameters:
      patterns - Expected substring or RegExp or a list of those.
    • hasAttribute

      public void hasAttribute(String name, String text, LocatorAssertions.HasAttributeOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with given attribute.

      **Usage**

      
       assertThat(page.locator("input")).hasAttribute("type", "text");
       
      Specified by:
      hasAttribute in interface LocatorAssertions
      Parameters:
      name - Attribute name.
      text - Expected attribute value.
    • hasAttribute

      public void hasAttribute(String name, Pattern pattern, LocatorAssertions.HasAttributeOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with given attribute.

      **Usage**

      
       assertThat(page.locator("input")).hasAttribute("type", "text");
       
      Specified by:
      hasAttribute in interface LocatorAssertions
      Parameters:
      name - Attribute name.
      pattern - Expected attribute value.
    • hasAttribute

      private void hasAttribute(String name, ExpectedTextValue expectedText, Object expectedValue, LocatorAssertions.HasAttributeOptions options)
    • hasClass

      public void hasClass(String text, LocatorAssertions.HasClassOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with given CSS classes. This needs to be a full match or using a relaxed regular expression.

      **Usage**

      
       assertThat(page.locator("#component")).hasClass(Pattern.compile("selected"));
       assertThat(page.locator("#component")).hasClass("selected row");
       

      Note that if array is passed as an expected value, entire lists of elements can be asserted:

      
       assertThat(page.locator("list > .component")).hasClass(new String[] {"component", "component selected", "component"});
       
      Specified by:
      hasClass in interface LocatorAssertions
      Parameters:
      text - Expected class or RegExp or a list of those.
    • hasClass

      public void hasClass(Pattern pattern, LocatorAssertions.HasClassOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with given CSS classes. This needs to be a full match or using a relaxed regular expression.

      **Usage**

      
       assertThat(page.locator("#component")).hasClass(Pattern.compile("selected"));
       assertThat(page.locator("#component")).hasClass("selected row");
       

      Note that if array is passed as an expected value, entire lists of elements can be asserted:

      
       assertThat(page.locator("list > .component")).hasClass(new String[] {"component", "component selected", "component"});
       
      Specified by:
      hasClass in interface LocatorAssertions
      Parameters:
      pattern - Expected class or RegExp or a list of those.
    • hasClass

      public void hasClass(String[] strings, LocatorAssertions.HasClassOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with given CSS classes. This needs to be a full match or using a relaxed regular expression.

      **Usage**

      
       assertThat(page.locator("#component")).hasClass(Pattern.compile("selected"));
       assertThat(page.locator("#component")).hasClass("selected row");
       

      Note that if array is passed as an expected value, entire lists of elements can be asserted:

      
       assertThat(page.locator("list > .component")).hasClass(new String[] {"component", "component selected", "component"});
       
      Specified by:
      hasClass in interface LocatorAssertions
      Parameters:
      strings - Expected class or RegExp or a list of those.
    • hasClass

      public void hasClass(Pattern[] patterns, LocatorAssertions.HasClassOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with given CSS classes. This needs to be a full match or using a relaxed regular expression.

      **Usage**

      
       assertThat(page.locator("#component")).hasClass(Pattern.compile("selected"));
       assertThat(page.locator("#component")).hasClass("selected row");
       

      Note that if array is passed as an expected value, entire lists of elements can be asserted:

      
       assertThat(page.locator("list > .component")).hasClass(new String[] {"component", "component selected", "component"});
       
      Specified by:
      hasClass in interface LocatorAssertions
      Parameters:
      patterns - Expected class or RegExp or a list of those.
    • hasCount

      public void hasCount(int count, LocatorAssertions.HasCountOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator resolves to an exact number of DOM nodes.

      **Usage**

      
       assertThat(page.locator("list > .component")).hasCount(3);
       
      Specified by:
      hasCount in interface LocatorAssertions
      Parameters:
      count - Expected count.
    • hasCSS

      public void hasCSS(String name, String value, LocatorAssertions.HasCSSOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator resolves to an element with the given computed CSS style.

      **Usage**

      
       assertThat(page.getByRole(AriaRole.BUTTON)).hasCSS("display", "flex");
       
      Specified by:
      hasCSS in interface LocatorAssertions
      Parameters:
      name - CSS property name.
      value - CSS property value.
    • hasCSS

      public void hasCSS(String name, Pattern pattern, LocatorAssertions.HasCSSOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator resolves to an element with the given computed CSS style.

      **Usage**

      
       assertThat(page.getByRole(AriaRole.BUTTON)).hasCSS("display", "flex");
       
      Specified by:
      hasCSS in interface LocatorAssertions
      Parameters:
      name - CSS property name.
      pattern - CSS property value.
    • hasCSS

      private void hasCSS(String name, ExpectedTextValue expectedText, Object expectedValue, LocatorAssertions.HasCSSOptions options)
    • hasId

      public void hasId(String id, LocatorAssertions.HasIdOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with the given DOM Node ID.

      **Usage**

      
       assertThat(page.getByRole(AriaRole.TEXTBOX)).hasId("lastname");
       
      Specified by:
      hasId in interface LocatorAssertions
      Parameters:
      id - Element id.
    • hasId

      public void hasId(Pattern pattern, LocatorAssertions.HasIdOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with the given DOM Node ID.

      **Usage**

      
       assertThat(page.getByRole(AriaRole.TEXTBOX)).hasId("lastname");
       
      Specified by:
      hasId in interface LocatorAssertions
      Parameters:
      pattern - Element id.
    • hasJSProperty

      public void hasJSProperty(String name, Object value, LocatorAssertions.HasJSPropertyOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with given JavaScript property. Note that this property can be of a primitive type as well as a plain serializable JavaScript object.

      **Usage**

      
       assertThat(page.locator("input")).hasJSProperty("loaded", true);
       
      Specified by:
      hasJSProperty in interface LocatorAssertions
      Parameters:
      name - Property name.
      value - Property value.
    • hasText

      public void hasText(String text, LocatorAssertions.HasTextOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with the given text. You can use regular expressions for the value as well.

      **Usage**

      
       assertThat(page.locator(".title")).hasText("Welcome, Test User");
       assertThat(page.locator(".title")).hasText(Pattern.compile("Welcome, .*"));
       

      If you pass an array as an expected value, the expectations are:

      1. Locator resolves to a list of elements.
      2. The number of elements equals the number of expected values in the array.
      3. Elements from the list have text matching expected array values, one by one, in order.

      For example, consider the following list:

      Let's see how we can use the assertion:

      
       // ✓ Has the right items in the right order
       assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
      
       // ✖ Wrong order
       assertThat(page.locator("ul > li")).hasText(new String[] {"Text 3", "Text 2", "Text 1"});
      
       // ✖ Last item does not match
       assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text"});
      
       // ✖ Locator points to the outer list element, not to the list items
       assertThat(page.locator("ul")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
       
      Specified by:
      hasText in interface LocatorAssertions
      Parameters:
      text - Expected string or RegExp or a list of those.
    • hasText

      public void hasText(Pattern pattern, LocatorAssertions.HasTextOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with the given text. You can use regular expressions for the value as well.

      **Usage**

      
       assertThat(page.locator(".title")).hasText("Welcome, Test User");
       assertThat(page.locator(".title")).hasText(Pattern.compile("Welcome, .*"));
       

      If you pass an array as an expected value, the expectations are:

      1. Locator resolves to a list of elements.
      2. The number of elements equals the number of expected values in the array.
      3. Elements from the list have text matching expected array values, one by one, in order.

      For example, consider the following list:

      Let's see how we can use the assertion:

      
       // ✓ Has the right items in the right order
       assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
      
       // ✖ Wrong order
       assertThat(page.locator("ul > li")).hasText(new String[] {"Text 3", "Text 2", "Text 1"});
      
       // ✖ Last item does not match
       assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text"});
      
       // ✖ Locator points to the outer list element, not to the list items
       assertThat(page.locator("ul")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
       
      Specified by:
      hasText in interface LocatorAssertions
      Parameters:
      pattern - Expected string or RegExp or a list of those.
    • hasText

      public void hasText(String[] strings, LocatorAssertions.HasTextOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with the given text. You can use regular expressions for the value as well.

      **Usage**

      
       assertThat(page.locator(".title")).hasText("Welcome, Test User");
       assertThat(page.locator(".title")).hasText(Pattern.compile("Welcome, .*"));
       

      If you pass an array as an expected value, the expectations are:

      1. Locator resolves to a list of elements.
      2. The number of elements equals the number of expected values in the array.
      3. Elements from the list have text matching expected array values, one by one, in order.

      For example, consider the following list:

      Let's see how we can use the assertion:

      
       // ✓ Has the right items in the right order
       assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
      
       // ✖ Wrong order
       assertThat(page.locator("ul > li")).hasText(new String[] {"Text 3", "Text 2", "Text 1"});
      
       // ✖ Last item does not match
       assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text"});
      
       // ✖ Locator points to the outer list element, not to the list items
       assertThat(page.locator("ul")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
       
      Specified by:
      hasText in interface LocatorAssertions
      Parameters:
      strings - Expected string or RegExp or a list of those.
    • hasText

      public void hasText(Pattern[] patterns, LocatorAssertions.HasTextOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with the given text. You can use regular expressions for the value as well.

      **Usage**

      
       assertThat(page.locator(".title")).hasText("Welcome, Test User");
       assertThat(page.locator(".title")).hasText(Pattern.compile("Welcome, .*"));
       

      If you pass an array as an expected value, the expectations are:

      1. Locator resolves to a list of elements.
      2. The number of elements equals the number of expected values in the array.
      3. Elements from the list have text matching expected array values, one by one, in order.

      For example, consider the following list:

      Let's see how we can use the assertion:

      
       // ✓ Has the right items in the right order
       assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
      
       // ✖ Wrong order
       assertThat(page.locator("ul > li")).hasText(new String[] {"Text 3", "Text 2", "Text 1"});
      
       // ✖ Last item does not match
       assertThat(page.locator("ul > li")).hasText(new String[] {"Text 1", "Text 2", "Text"});
      
       // ✖ Locator points to the outer list element, not to the list items
       assertThat(page.locator("ul")).hasText(new String[] {"Text 1", "Text 2", "Text 3"});
       
      Specified by:
      hasText in interface LocatorAssertions
      Parameters:
      patterns - Expected string or RegExp or a list of those.
    • hasValue

      public void hasValue(String value, LocatorAssertions.HasValueOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with the given input value. You can use regular expressions for the value as well.

      **Usage**

      
       assertThat(page.locator("input[type=number]")).hasValue(Pattern.compile("[0-9]"));
       
      Specified by:
      hasValue in interface LocatorAssertions
      Parameters:
      value - Expected value.
    • hasValue

      public void hasValue(Pattern pattern, LocatorAssertions.HasValueOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element with the given input value. You can use regular expressions for the value as well.

      **Usage**

      
       assertThat(page.locator("input[type=number]")).hasValue(Pattern.compile("[0-9]"));
       
      Specified by:
      hasValue in interface LocatorAssertions
      Parameters:
      pattern - Expected value.
    • hasValues

      public void hasValues(String[] values, LocatorAssertions.HasValuesOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to multi-select/combobox (i.e. a select with the multiple attribute) and the specified values are selected.

      **Usage**

      For example, given the following element:

      
       page.locator("id=favorite-colors").selectOption(["R", "G"]);
       assertThat(page.locator("id=favorite-colors")).hasValues(new Pattern[] { Pattern.compile("R"), Pattern.compile("G") });
       
      Specified by:
      hasValues in interface LocatorAssertions
      Parameters:
      values - Expected options currently selected.
    • hasValues

      public void hasValues(Pattern[] patterns, LocatorAssertions.HasValuesOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to multi-select/combobox (i.e. a select with the multiple attribute) and the specified values are selected.

      **Usage**

      For example, given the following element:

      
       page.locator("id=favorite-colors").selectOption(["R", "G"]);
       assertThat(page.locator("id=favorite-colors")).hasValues(new Pattern[] { Pattern.compile("R"), Pattern.compile("G") });
       
      Specified by:
      hasValues in interface LocatorAssertions
      Parameters:
      patterns - Expected options currently selected.
    • isChecked

      public void isChecked(LocatorAssertions.IsCheckedOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to a checked input.

      **Usage**

      
       assertThat(page.getByLabel("Subscribe to newsletter")).isChecked();
       
      Specified by:
      isChecked in interface LocatorAssertions
    • isDisabled

      public void isDisabled(LocatorAssertions.IsDisabledOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to a disabled element. Element is disabled if it has "disabled" attribute or is disabled via 'aria-disabled'. Note that only native control elements such as HTML button, input, select, textarea, option, optgroup can be disabled by setting "disabled" attribute. "disabled" attribute on other elements is ignored by the browser.

      **Usage**

      
       assertThat(page.locator("button.submit")).isDisabled();
       
      Specified by:
      isDisabled in interface LocatorAssertions
    • isEditable

      public void isEditable(LocatorAssertions.IsEditableOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an editable element.

      **Usage**

      
       assertThat(page.getByRole(AriaRole.TEXTBOX)).isEditable();
       
      Specified by:
      isEditable in interface LocatorAssertions
    • isEmpty

      public void isEmpty(LocatorAssertions.IsEmptyOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an empty editable element or to a DOM node that has no text.

      **Usage**

      
       assertThat(page.locator("div.warning")).isEmpty();
       
      Specified by:
      isEmpty in interface LocatorAssertions
    • isEnabled

      public void isEnabled(LocatorAssertions.IsEnabledOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an enabled element.

      **Usage**

      
       assertThat(page.locator("button.submit")).isEnabled();
       
      Specified by:
      isEnabled in interface LocatorAssertions
    • isFocused

      public void isFocused(LocatorAssertions.IsFocusedOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to a focused DOM node.

      **Usage**

      
       assertThat(page.getByRole(AriaRole.TEXTBOX)).isFocused();
       
      Specified by:
      isFocused in interface LocatorAssertions
    • isHidden

      public void isHidden(LocatorAssertions.IsHiddenOptions options)
      Description copied from interface: LocatorAssertions
      Ensures that Locator either does not resolve to any DOM node, or resolves to a non-visible one.

      **Usage**

      
       assertThat(page.locator(".my-element")).isHidden();
       
      Specified by:
      isHidden in interface LocatorAssertions
    • isInViewport

      public void isInViewport(LocatorAssertions.IsInViewportOptions options)
      Description copied from interface: LocatorAssertions
      Ensures the Locator points to an element that intersects viewport, according to the intersection observer API.

      **Usage**

      
       Locator locator = page.getByRole(AriaRole.BUTTON);
       // Make sure at least some part of element intersects viewport.
       assertThat(locator).isInViewport();
       // Make sure element is fully outside of viewport.
       assertThat(locator).not().isInViewport();
       // Make sure that at least half of the element intersects viewport.
       assertThat(locator).isInViewport(new LocatorAssertions.IsInViewportOptions().setRatio(0.5));
       
      Specified by:
      isInViewport in interface LocatorAssertions
    • isVisible

      public void isVisible(LocatorAssertions.IsVisibleOptions options)
      Description copied from interface: LocatorAssertions
      Ensures that Locator points to an attached and visible DOM node.

      To check that at least one element from the list is visible, use

      invalid reference
      Locator.first()
      .

      **Usage**

      
       // A specific element is visible.
       assertThat(page.getByText("Welcome")).isVisible();
      
       // At least one item in the list is visible.
       asserThat(page.getByTestId("todo-item").first()).isVisible();
      
       // At least one of the two elements is visible, possibly both.
       asserThat(
         page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Sign in"))
           .or(page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Sign up")))
           .first()
       ).isVisible();
       
      Specified by:
      isVisible in interface LocatorAssertions
    • expectTrue

      private void expectTrue(String expression, String message, FrameExpectOptions options)
    • not

      public LocatorAssertions not()
      Description copied from interface: LocatorAssertions
      Makes the assertion check for the opposite condition. For example, this code tests that the Locator doesn't contain text "error":
      
       assertThat(locator).not().containsText("error");
       
      Specified by:
      not in interface LocatorAssertions
    • isAttached

      public void isAttached(LocatorAssertions.IsAttachedOptions options)
      Description copied from interface: LocatorAssertions
      Ensures that Locator points to an attached DOM node.

      **Usage**

      
       assertThat(page.getByText("Hidden text")).isAttached();
       
      Specified by:
      isAttached in interface LocatorAssertions
    • shouldIgnoreCase

      private static Boolean shouldIgnoreCase(Object options)