Uses of Interface
com.microsoft.playwright.Locator
Packages that use Locator
Package
Description
-
Uses of Locator in com.microsoft.playwright
Fields in com.microsoft.playwright declared as LocatorModifier and TypeFieldDescriptionFrame.LocatorOptions.hasMatches elements containing an element that matches an inner locator.FrameLocator.LocatorOptions.hasMatches elements containing an element that matches an inner locator.Locator.FilterOptions.hasMatches elements containing an element that matches an inner locator.Locator.LocatorOptions.hasMatches elements containing an element that matches an inner locator.Page.LocatorOptions.hasMatches elements containing an element that matches an inner locator.Frame.LocatorOptions.hasNotMatches elements that do not contain an element that matches an inner locator.FrameLocator.LocatorOptions.hasNotMatches elements that do not contain an element that matches an inner locator.Locator.FilterOptions.hasNotMatches elements that do not contain an element that matches an inner locator.Locator.LocatorOptions.hasNotMatches elements that do not contain an element that matches an inner locator.Page.LocatorOptions.hasNotMatches elements that do not contain an element that matches an inner locator.Fields in com.microsoft.playwright with type parameters of type LocatorModifier and TypeFieldDescriptionElementHandle.ScreenshotOptions.maskSpecify locators that should be masked when the screenshot is taken.Locator.ScreenshotOptions.maskSpecify locators that should be masked when the screenshot is taken.Page.ScreenshotOptions.maskSpecify locators that should be masked when the screenshot is taken.Methods in com.microsoft.playwright that return LocatorModifier and TypeMethodDescriptionCreates a locator that matches both this locator and the argument locator.default LocatorLocator.filter()This method narrows existing locator according to the options, for example filters by text.Locator.filter(Locator.FilterOptions options) This method narrows existing locator according to the options, for example filters by text.Locator.first()Returns locator to the first matching element.default LocatorFrame.getByAltText(String text) Allows locating elements by their alt text.Frame.getByAltText(String text, Frame.GetByAltTextOptions options) Allows locating elements by their alt text.default LocatorFrame.getByAltText(Pattern text) Allows locating elements by their alt text.Frame.getByAltText(Pattern text, Frame.GetByAltTextOptions options) Allows locating elements by their alt text.default LocatorFrameLocator.getByAltText(String text) Allows locating elements by their alt text.FrameLocator.getByAltText(String text, FrameLocator.GetByAltTextOptions options) Allows locating elements by their alt text.default LocatorFrameLocator.getByAltText(Pattern text) Allows locating elements by their alt text.FrameLocator.getByAltText(Pattern text, FrameLocator.GetByAltTextOptions options) Allows locating elements by their alt text.default LocatorLocator.getByAltText(String text) Allows locating elements by their alt text.Locator.getByAltText(String text, Locator.GetByAltTextOptions options) Allows locating elements by their alt text.default LocatorLocator.getByAltText(Pattern text) Allows locating elements by their alt text.Locator.getByAltText(Pattern text, Locator.GetByAltTextOptions options) Allows locating elements by their alt text.default LocatorPage.getByAltText(String text) Allows locating elements by their alt text.Page.getByAltText(String text, Page.GetByAltTextOptions options) Allows locating elements by their alt text.default LocatorPage.getByAltText(Pattern text) Allows locating elements by their alt text.Page.getByAltText(Pattern text, Page.GetByAltTextOptions options) Allows locating elements by their alt text.default LocatorFrame.getByLabel(String text) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.Frame.getByLabel(String text, Frame.GetByLabelOptions options) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.default LocatorFrame.getByLabel(Pattern text) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.Frame.getByLabel(Pattern text, Frame.GetByLabelOptions options) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.default LocatorFrameLocator.getByLabel(String text) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.FrameLocator.getByLabel(String text, FrameLocator.GetByLabelOptions options) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.default LocatorFrameLocator.getByLabel(Pattern text) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.FrameLocator.getByLabel(Pattern text, FrameLocator.GetByLabelOptions options) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.default LocatorLocator.getByLabel(String text) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.Locator.getByLabel(String text, Locator.GetByLabelOptions options) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.default LocatorLocator.getByLabel(Pattern text) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.Locator.getByLabel(Pattern text, Locator.GetByLabelOptions options) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.default LocatorPage.getByLabel(String text) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.Page.getByLabel(String text, Page.GetByLabelOptions options) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.default LocatorPage.getByLabel(Pattern text) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.Page.getByLabel(Pattern text, Page.GetByLabelOptions options) Allows locating input elements by the text of the associated<label>oraria-labelledbyelement, or by thearia-labelattribute.default LocatorFrame.getByPlaceholder(String text) Allows locating input elements by the placeholder text.Frame.getByPlaceholder(String text, Frame.GetByPlaceholderOptions options) Allows locating input elements by the placeholder text.default LocatorFrame.getByPlaceholder(Pattern text) Allows locating input elements by the placeholder text.Frame.getByPlaceholder(Pattern text, Frame.GetByPlaceholderOptions options) Allows locating input elements by the placeholder text.default LocatorFrameLocator.getByPlaceholder(String text) Allows locating input elements by the placeholder text.FrameLocator.getByPlaceholder(String text, FrameLocator.GetByPlaceholderOptions options) Allows locating input elements by the placeholder text.default LocatorFrameLocator.getByPlaceholder(Pattern text) Allows locating input elements by the placeholder text.FrameLocator.getByPlaceholder(Pattern text, FrameLocator.GetByPlaceholderOptions options) Allows locating input elements by the placeholder text.default LocatorLocator.getByPlaceholder(String text) Allows locating input elements by the placeholder text.Locator.getByPlaceholder(String text, Locator.GetByPlaceholderOptions options) Allows locating input elements by the placeholder text.default LocatorLocator.getByPlaceholder(Pattern text) Allows locating input elements by the placeholder text.Locator.getByPlaceholder(Pattern text, Locator.GetByPlaceholderOptions options) Allows locating input elements by the placeholder text.default LocatorPage.getByPlaceholder(String text) Allows locating input elements by the placeholder text.Page.getByPlaceholder(String text, Page.GetByPlaceholderOptions options) Allows locating input elements by the placeholder text.default LocatorPage.getByPlaceholder(Pattern text) Allows locating input elements by the placeholder text.Page.getByPlaceholder(Pattern text, Page.GetByPlaceholderOptions options) Allows locating input elements by the placeholder text.default LocatorFrame.getByRole(AriaRole role, Frame.GetByRoleOptions options) default LocatorFrameLocator.getByRole(AriaRole role, FrameLocator.GetByRoleOptions options) default LocatorLocator.getByRole(AriaRole role, Locator.GetByRoleOptions options) default LocatorPage.getByRole(AriaRole role, Page.GetByRoleOptions options) Frame.getByTestId(String testId) Locate element by the test id.Frame.getByTestId(Pattern testId) Locate element by the test id.FrameLocator.getByTestId(String testId) Locate element by the test id.FrameLocator.getByTestId(Pattern testId) Locate element by the test id.Locator.getByTestId(String testId) Locate element by the test id.Locator.getByTestId(Pattern testId) Locate element by the test id.Page.getByTestId(String testId) Locate element by the test id.Page.getByTestId(Pattern testId) Locate element by the test id.default LocatorAllows locating elements that contain given text.Frame.getByText(String text, Frame.GetByTextOptions options) Allows locating elements that contain given text.default LocatorAllows locating elements that contain given text.Frame.getByText(Pattern text, Frame.GetByTextOptions options) Allows locating elements that contain given text.default LocatorAllows locating elements that contain given text.FrameLocator.getByText(String text, FrameLocator.GetByTextOptions options) Allows locating elements that contain given text.default LocatorAllows locating elements that contain given text.FrameLocator.getByText(Pattern text, FrameLocator.GetByTextOptions options) Allows locating elements that contain given text.default LocatorAllows locating elements that contain given text.Locator.getByText(String text, Locator.GetByTextOptions options) Allows locating elements that contain given text.default LocatorAllows locating elements that contain given text.Locator.getByText(Pattern text, Locator.GetByTextOptions options) Allows locating elements that contain given text.default LocatorAllows locating elements that contain given text.Page.getByText(String text, Page.GetByTextOptions options) Allows locating elements that contain given text.default LocatorAllows locating elements that contain given text.Page.getByText(Pattern text, Page.GetByTextOptions options) Allows locating elements that contain given text.default LocatorFrame.getByTitle(String text) Allows locating elements by their title attribute.Frame.getByTitle(String text, Frame.GetByTitleOptions options) Allows locating elements by their title attribute.default LocatorFrame.getByTitle(Pattern text) Allows locating elements by their title attribute.Frame.getByTitle(Pattern text, Frame.GetByTitleOptions options) Allows locating elements by their title attribute.default LocatorFrameLocator.getByTitle(String text) Allows locating elements by their title attribute.FrameLocator.getByTitle(String text, FrameLocator.GetByTitleOptions options) Allows locating elements by their title attribute.default LocatorFrameLocator.getByTitle(Pattern text) Allows locating elements by their title attribute.FrameLocator.getByTitle(Pattern text, FrameLocator.GetByTitleOptions options) Allows locating elements by their title attribute.default LocatorLocator.getByTitle(String text) Allows locating elements by their title attribute.Locator.getByTitle(String text, Locator.GetByTitleOptions options) Allows locating elements by their title attribute.default LocatorLocator.getByTitle(Pattern text) Allows locating elements by their title attribute.Locator.getByTitle(Pattern text, Locator.GetByTitleOptions options) Allows locating elements by their title attribute.default LocatorPage.getByTitle(String text) Allows locating elements by their title attribute.Page.getByTitle(String text, Page.GetByTitleOptions options) Allows locating elements by their title attribute.default LocatorPage.getByTitle(Pattern text) Allows locating elements by their title attribute.Page.getByTitle(Pattern text, Page.GetByTitleOptions options) Allows locating elements by their title attribute.Locator.last()Returns locator to the last matching element.default LocatorThe method returns an element locator that can be used to perform actions on this page / frame.Frame.locator(String selector, Frame.LocatorOptions options) The method returns an element locator that can be used to perform actions on this page / frame.default LocatorThe method finds an element matching the specified selector in the locator's subtree.FrameLocator.locator(Locator selectorOrLocator, FrameLocator.LocatorOptions options) The method finds an element matching the specified selector in the locator's subtree.default LocatorThe method finds an element matching the specified selector in the locator's subtree.FrameLocator.locator(String selectorOrLocator, FrameLocator.LocatorOptions options) The method finds an element matching the specified selector in the locator's subtree.default LocatorThe method finds an element matching the specified selector in the locator's subtree.Locator.locator(Locator selectorOrLocator, Locator.LocatorOptions options) The method finds an element matching the specified selector in the locator's subtree.default LocatorThe method finds an element matching the specified selector in the locator's subtree.Locator.locator(String selectorOrLocator, Locator.LocatorOptions options) The method finds an element matching the specified selector in the locator's subtree.default LocatorThe method returns an element locator that can be used to perform actions on this page / frame.Page.locator(String selector, Page.LocatorOptions options) The method returns an element locator that can be used to perform actions on this page / frame.Locator.nth(int index) Returns locator to the n-th matching element.Creates a locator that matches either of the two locators.Methods in com.microsoft.playwright that return types with arguments of type LocatorModifier and TypeMethodDescriptionLocator.all()When the locator points to a list of elements, this returns an array of locators, pointing to their respective elements.Methods in com.microsoft.playwright with parameters of type LocatorModifier and TypeMethodDescriptionCreates a locator that matches both this locator and the argument locator.default voidDrag the source element towards the target element and drop it.voidLocator.dragTo(Locator target, Locator.DragToOptions options) Drag the source element towards the target element and drop it.default LocatorThe method finds an element matching the specified selector in the locator's subtree.FrameLocator.locator(Locator selectorOrLocator, FrameLocator.LocatorOptions options) The method finds an element matching the specified selector in the locator's subtree.default LocatorThe method finds an element matching the specified selector in the locator's subtree.Locator.locator(Locator selectorOrLocator, Locator.LocatorOptions options) The method finds an element matching the specified selector in the locator's subtree.Creates a locator that matches either of the two locators.Matches elements containing an element that matches an inner locator.Matches elements containing an element that matches an inner locator.Matches elements containing an element that matches an inner locator.Matches elements containing an element that matches an inner locator.Matches elements containing an element that matches an inner locator.Matches elements that do not contain an element that matches an inner locator.Matches elements that do not contain an element that matches an inner locator.Matches elements that do not contain an element that matches an inner locator.Matches elements that do not contain an element that matches an inner locator.Matches elements that do not contain an element that matches an inner locator.Method parameters in com.microsoft.playwright with type arguments of type LocatorModifier and TypeMethodDescriptionSpecify locators that should be masked when the screenshot is taken.Specify locators that should be masked when the screenshot is taken.Specify locators that should be masked when the screenshot is taken. -
Uses of Locator in com.microsoft.playwright.assertions
Methods in com.microsoft.playwright.assertions with parameters of type LocatorModifier and TypeMethodDescriptionstatic LocatorAssertionsPlaywrightAssertions.assertThat(Locator locator) Creates aLocatorAssertionsobject for the givenLocator. -
Uses of Locator in com.microsoft.playwright.impl
Classes in com.microsoft.playwright.impl that implement LocatorMethods in com.microsoft.playwright.impl that return LocatorModifier and TypeMethodDescriptionLocatorImpl.filter(Locator.FilterOptions options) LocatorImpl.first()FrameImpl.getByAltText(String text, Frame.GetByAltTextOptions options) FrameImpl.getByAltText(Pattern text, Frame.GetByAltTextOptions options) FrameLocatorImpl.getByAltText(String text, FrameLocator.GetByAltTextOptions options) FrameLocatorImpl.getByAltText(Pattern text, FrameLocator.GetByAltTextOptions options) LocatorImpl.getByAltText(String text, Locator.GetByAltTextOptions options) LocatorImpl.getByAltText(Pattern text, Locator.GetByAltTextOptions options) PageImpl.getByAltText(String text, Page.GetByAltTextOptions options) PageImpl.getByAltText(Pattern text, Page.GetByAltTextOptions options) FrameImpl.getByLabel(String text, Frame.GetByLabelOptions options) FrameImpl.getByLabel(Pattern text, Frame.GetByLabelOptions options) FrameLocatorImpl.getByLabel(String text, FrameLocator.GetByLabelOptions options) FrameLocatorImpl.getByLabel(Pattern text, FrameLocator.GetByLabelOptions options) LocatorImpl.getByLabel(String text, Locator.GetByLabelOptions options) LocatorImpl.getByLabel(Pattern text, Locator.GetByLabelOptions options) PageImpl.getByLabel(String text, Page.GetByLabelOptions options) PageImpl.getByLabel(Pattern text, Page.GetByLabelOptions options) FrameImpl.getByPlaceholder(String text, Frame.GetByPlaceholderOptions options) FrameImpl.getByPlaceholder(Pattern text, Frame.GetByPlaceholderOptions options) FrameLocatorImpl.getByPlaceholder(String text, FrameLocator.GetByPlaceholderOptions options) FrameLocatorImpl.getByPlaceholder(Pattern text, FrameLocator.GetByPlaceholderOptions options) LocatorImpl.getByPlaceholder(String text, Locator.GetByPlaceholderOptions options) LocatorImpl.getByPlaceholder(Pattern text, Locator.GetByPlaceholderOptions options) PageImpl.getByPlaceholder(String text, Page.GetByPlaceholderOptions options) PageImpl.getByPlaceholder(Pattern text, Page.GetByPlaceholderOptions options) FrameImpl.getByRole(AriaRole role, Frame.GetByRoleOptions options) FrameLocatorImpl.getByRole(AriaRole role, FrameLocator.GetByRoleOptions options) LocatorImpl.getByRole(AriaRole role, Locator.GetByRoleOptions options) PageImpl.getByRole(AriaRole role, Page.GetByRoleOptions options) FrameImpl.getByTestId(String testId) FrameImpl.getByTestId(Pattern testId) FrameLocatorImpl.getByTestId(String testId) FrameLocatorImpl.getByTestId(Pattern testId) LocatorImpl.getByTestId(String testId) LocatorImpl.getByTestId(Pattern testId) PageImpl.getByTestId(String testId) PageImpl.getByTestId(Pattern testId) FrameImpl.getByText(String text, Frame.GetByTextOptions options) FrameImpl.getByText(Pattern text, Frame.GetByTextOptions options) FrameLocatorImpl.getByText(String text, FrameLocator.GetByTextOptions options) FrameLocatorImpl.getByText(Pattern text, FrameLocator.GetByTextOptions options) LocatorImpl.getByText(String text, Locator.GetByTextOptions options) LocatorImpl.getByText(Pattern text, Locator.GetByTextOptions options) PageImpl.getByText(String text, Page.GetByTextOptions options) PageImpl.getByText(Pattern text, Page.GetByTextOptions options) FrameImpl.getByTitle(String text, Frame.GetByTitleOptions options) FrameImpl.getByTitle(Pattern text, Frame.GetByTitleOptions options) FrameLocatorImpl.getByTitle(String text, FrameLocator.GetByTitleOptions options) FrameLocatorImpl.getByTitle(Pattern text, FrameLocator.GetByTitleOptions options) LocatorImpl.getByTitle(String text, Locator.GetByTitleOptions options) LocatorImpl.getByTitle(Pattern text, Locator.GetByTitleOptions options) PageImpl.getByTitle(String text, Page.GetByTitleOptions options) PageImpl.getByTitle(Pattern text, Page.GetByTitleOptions options) LocatorImpl.last()FrameImpl.locator(String selector, Frame.LocatorOptions options) FrameLocatorImpl.locator(Locator selectorOrLocator, FrameLocator.LocatorOptions options) FrameLocatorImpl.locator(String selector, FrameLocator.LocatorOptions options) LocatorImpl.locator(Locator selectorOrLocator, Locator.LocatorOptions options) LocatorImpl.locator(String selector, Locator.LocatorOptions options) PageImpl.locator(String selector, Page.LocatorOptions options) LocatorImpl.nth(int index) Methods in com.microsoft.playwright.impl that return types with arguments of type LocatorMethods in com.microsoft.playwright.impl with parameters of type LocatorModifier and TypeMethodDescriptionvoidLocatorImpl.dragTo(Locator target, Locator.DragToOptions options) FrameLocatorImpl.locator(Locator selectorOrLocator, FrameLocator.LocatorOptions options) LocatorImpl.locator(Locator selectorOrLocator, Locator.LocatorOptions options) Constructors in com.microsoft.playwright.impl with parameters of type LocatorModifierConstructorDescriptionLocatorAssertionsImpl(Locator locator) privateLocatorAssertionsImpl(Locator locator, boolean isNot)