Class InputBy

java.lang.Object
co.verisoft.fw.utils.locators.InputBy

public final class InputBy extends Object

Find elements which are of type input.
This mechanism used to locate elements within a form.

Since:
0.1
Author:
Nir Gallner
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.openqa.selenium.By
    label(String labelText)
    Will return a list of By objects, which are a. Of type input b. Contains the label sent as parameter c. Has a general structure of <label><input /> </label> For example:
    The following html code:

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • label

      public static org.openqa.selenium.By label(String labelText)

      Will return a list of By objects, which are

      • a. Of type input
      • b. Contains the label sent as parameter
      • c. Has a general structure of <label><input /> </label>
      For example:
      The following html code:
       
       <html>
       	<body>
       		<label>This is a label 
       			<input id="text">
       		</label>
      	</body>
       </html>
        
      can be located using any of the words 'This is a label':
      driver.findElements(InputBy.label("label"));
      If the structure of the form does not comply with <label> <input /> </label> then the search will not find the input
      Parameters:
      labelText - the name of the label to look for
      Returns:
      By object to be searched for in findElements