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

com.automationrockstars.design.gir.webdriver.Row Maven / Gradle / Ivy

The newest version!
/*******************************************************************************
 * Copyright (c) 2015, 2016 Automation RockStars Ltd.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Apache License v2.0
 * which accompanies this distribution, and is available at
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Contributors:
 *     Automation RockStars - initial API and implementation
 *******************************************************************************/
package com.automationrockstars.design.gir.webdriver;

import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;

import java.util.List;

public class Row extends UiObject {

    public Row(WebElement toWrap) {
        super(toWrap);
    }


    public List cells() {
        return this.findElements(By.tagName("td"));
    }

    public WebElement cell(int i) {
        return this.findElement(By.xpath(".//td[" + i + "]"));
    }

    public boolean hasText(final String textToFind) {
        return this.getText().contains(textToFind);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy