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

framework.expedia.pages.CarSearchResultComponent 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;

public class CarSearchResultComponent extends Container{
    private static Logger logger = Logger.getLogger(CarSearchResultComponent.class.getName());


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

    public void reserve(int index) {
        logger.info("Search result item found " + reserveButtons.size());
        for (int i=0; i index)
            reserveButtons.get(index).click();
        else
            throw new RuntimeException("index is out of boundary, index= " + index);

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy