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

framework.expedia.pages.SuggestionSelectComponent Maven / Gradle / Ivy

There is a newer version: 0.1.2
Show newest version
package framework.expedia.pages;

import com.github.licanhua.test.framework.Container;
import org.apache.log4j.Logger;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;

import java.util.List;

// id=display-group-results
public class SuggestionSelectComponent extends Container{
    private static Logger logger = Logger.getLogger(SuggestionSelectComponent.class.getName());

    @FindBy(xpath=".//a[starts-with(@id, 'aria-option-')]")
    List selections;

    public void select(int index) {
        if (selections.size() > index)
            selections.get(index).click();
        else
            throw new RuntimeException("index is out of boundary, index= " + index);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy