Search in sources :

Example 1 with NullRemove

use of com.driver.locator.utility.NullRemove in project selenium_java by sergueik.

the class ElementLocator method getLocator.

public List<LocatorModel> getLocator(WebDriver aDriver) {
    List<LocatorModel> locatorList = new ArrayList<LocatorModel>();
    locatorList.addAll(getElementsByTag(TAG_LINK, aDriver));
    locatorList.addAll(getElementsByTag(TAG_BUTTON, aDriver));
    locatorList.addAll(getElementsByTag(TAG_DROP_DOWN, aDriver));
    locatorList.addAll(getElementsByTag(TAG_INPUT, aDriver));
    locatorList.addAll(getElementsByTag(TAG_TEXT_AREA, aDriver));
    locatorList.addAll(getElementsByTag(TAG_SPAN, aDriver));
    locatorList.removeIf(new NullRemove());
    return locatorList;
}
Also used : LocatorModel(com.driver.locator.model.LocatorModel) ArrayList(java.util.ArrayList) NullRemove(com.driver.locator.utility.NullRemove)

Aggregations

LocatorModel (com.driver.locator.model.LocatorModel)1 NullRemove (com.driver.locator.utility.NullRemove)1 ArrayList (java.util.ArrayList)1