Class Control

    • Constructor Detail

      • Control

        public Control​(PageObject parent,
                       String... paths)
        Creates a control by giving their full path in the page
      • Control

        public Control​(com.google.inject.Injector injector,
                       org.openqa.selenium.By selector)
    • Method Detail

      • resolve

        public org.openqa.selenium.WebElement resolve()
      • sendKeys

        public void sendKeys​(String t)
      • uncheck

        public void uncheck()
      • check

        public void check()
      • check

        public void check​(boolean state)
      • setAtOnce

        public void setAtOnce​(String text)
        The existing set(String) method has shortcomings regarding large strings because it utilizes the sendKeys mechanism to enter the string which takes a significant amount of time, i.e. the browser may consider the script to be unresponsive.

        This method method shall provide a high throughput mechanism which puts the whole string at once into the text field instead of char by char.

        This is a solution / workaround published for Selenium Issue 4496: #4496

        Parameters:
        text - the large string to be entered
      • get

        public String get()
        Returns the value of the input field.
        Returns:
        the value of the input field.
      • set

        public void set​(@Nullable
                        String text)
        Sets the value of the input field to the specified text.

        Any existing value gets cleared.

      • set

        public void set​(Object text)
      • selectDropdownMenu

        public void selectDropdownMenu​(Class<?> type)
        Clicks a menu button, and selects the matching item from the drop down. TODO using a class name as the Describable.value() does not seem to work.
        Parameters:
        type - Class with Describable annotation.
      • selectDropdownMenu

        public void selectDropdownMenu​(String displayName)
      • selectDropdownMenuAlt

        public void selectDropdownMenuAlt​(Class<?> type)
        For alternative use when the 'yui-menu-button' doesn't exist.
      • select

        public void select​(String option)
        Select an option.
      • select

        public void select​(Class<?> describable)
      • choose

        public void choose​(Class<?> describable)
      • upload

        public void upload​(Resource res)
      • getSilentFormValidation

        public FormValidation getSilentFormValidation()
      • exists

        public boolean exists()
        Determines whether an object is existing on the current page
        Returns:
        TRUE if it exists