This interface describes the functions that are needed from the driver object passed to the factory functions in this utility. This allows tests to pass either the main WebDriver instance or individual WebElements from which to locate the component elemenet.

###### Using WebDriver instance to locate a button in the document

    const driver = new Builder().build();
    let button = await ojButton(driver, By.id("mybutton"))

###### Using WebElement instance to locate a button underneath a <div>

    let div = await driver.findElement(By.id("my-div"));
    let button = await ojButton(div, By.css("oj-button"));

### Hierarchy

- DriverLike

## Index

### Methods

- findElement
- findElements

## Methods

### findElement

- findElement(by: Locator): WebElementPromise

- Find an element using a given locator strategy

  #### Parameters

  - ##### by: Locator

    The locator strategy to find the element

  #### Returns WebElementPromise

### findElements

- findElements(by: Locator): Promise<WebElement[]>

- Find a set of elements using a given locator strategy

  #### Parameters

  - ##### by: Locator

    The locator strategy to find the elements

  #### Returns Promise<WebElement[]>

Generated using TypeDoc