Interface Locators

  • All Implemented Interfaces:
    com.vaadin.browserless.locator.GeneratedLocators

    
    public interface Locators
     implements GeneratedLocators
                        

    Mixin offering typed entry points for the find* tester API.

    Most entry points come from GeneratedLocators, which is emitted by the locator annotation processor at build time. This interface adds the generic find for user-defined locators and the activateLocatorContext hook that context-bound implementations (e.g. BrowserlessUIContext) override.

    Since:

    1.1

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      void activateLocatorContext() Hook for context-bound implementations to install Vaadin thread-locals before a locator is built.
      <L extends Locator<out Object, L>> L find(Supplier<L> factory) Generic entry point for user-defined locators.
      • Methods inherited from class com.vaadin.browserless.locator.GeneratedLocators

        findAccordion, findAnchor, findBigDecimalField, findBreadcrumbs, findButton, findCheckbox, findCheckboxGroup, findComboBox, findConfirmDialog, findContextMenu, findDatePicker, findDateTimePicker, findDecimalRangeSlider, findDecimalSlider, findDescriptionList, findDetails, findDialog, findDiv, findEmailField, findEmphasis, findGrid, findH1, findH2, findH3, findH4, findH5, findH6, findHr, findImage, findInput, findIntegerField, findIntegerRangeSlider, findIntegerSlider, findListBox, findListItem, findLoginForm, findLoginOverlay, findMarkdown, findMasterDetailLayout, findMenuBar, findMessageInput, findMessageList, findMultiSelectComboBox, findMultiSelectListBox, findNativeButton, findNativeDetails, findNativeLabel, findNotification, findNumberField, findOrderedList, findParagraph, findPasswordField, findPopover, findPre, findRadioButton, findRadioButtonGroup, findRangeInput, findRouterLink, findSelect, findSideNav, findSpan, findTabSheet, findTabs, findTextArea, findTextField, findTimePicker, findUnorderedList, findUpload, findVirtualList, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use, use
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • activateLocatorContext

         void activateLocatorContext()

        Hook for context-bound implementations to install Vaadin thread-locals before a locator is built. Default is a no-op.

      • find

         <L extends Locator<out Object, L>> L find(Supplier<L> factory)

        Generic entry point for user-defined locators. Activates the locator context (so thread-locals and the security snapshot are restored on a window switch) and invokes the supplied factory.

        window.find(CheckoutFormLocator::new).withId("checkout").submit();
        
        Parameters:
        factory - supplier that creates a fresh locator instance, typically a constructor reference
        Returns:

        the locator created by the factory, ready for chaining