All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sdl.selenium.web.SearchText Maven / Gradle / Ivy

Go to download

Automated Acceptance Testing. Selenium and Selenium WebDriver test framework for web applications. (optimized for dynamic html, ExtJS, Bootstrap, complex UI, simple web applications/sites)

The newest version!
package com.sdl.selenium.web;

import java.util.*;

public class SearchText {

    private String value;
    private List searchTypes = new ArrayList<>();

    public SearchText(String value, List searchTypes) {
        this.value = value;
        this.searchTypes = searchTypes;
    }

    public SearchText(String value, SearchType... searchTypes) {
        this.value = value;
        setSearchTypes(searchTypes);
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public List getSearchTypes() {
        return searchTypes;
    }

    public void setSearchTypes(SearchType... searchTypes) {
        if (searchTypes != null) {
            if (searchTypes.length == 0) {
                Collections.addAll(this.searchTypes, SearchType.EQUALS);
            } else {
                Collections.addAll(this.searchTypes, searchTypes);
            }
        } else {
            this.searchTypes.addAll(new XPathBuilder().defaultSearchTextType);
        }
        new XPathBuilder().cleanUpSearchType(this.searchTypes);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy