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

io.github.kgress.scaffold.webelements.ImageWebElement Maven / Gradle / Ivy

There is a newer version: 3.5.0
Show newest version
package io.github.kgress.scaffold.webelements;

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

/**
 * A strongly typed representation of an Image {@link WebElement}.
 */
public class ImageWebElement extends AbstractWebElement {

    public ImageWebElement(By by, WebElement parentElement) {
        super(by, parentElement);
    }

    public ImageWebElement(By by) {
        super(by);
    }

    public ImageWebElement(WebElement element) {
        super(element);
    }

    /**
     * Returns the contents of the "src" attribute in the Image link (usually a pointer to a URL)
     *
     * @return the image source as {@link String}
     */
    public String getImageSource() {
        return getWebElement().getAttribute("src");
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy