ru.yandex.qatools.htmlelements.element.Image Maven / Gradle / Ivy
package ru.yandex.qatools.htmlelements.element;
import org.openqa.selenium.WebElement;
/**
* Represents image
*
* @author Nikolay Mulyar [email protected]
*/
public class Image extends TypifiedElement {
public Image(WebElement wrappedElement) {
super(wrappedElement);
}
/**
* Retrieves path to image from "src" attribute
*
* @return Path to the image
*/
public String getSource() {
return getWrappedElement().getAttribute("src");
}
/**
* Retrieves alternative text from "alt" attribute
*
* @return alternative text for image
*/
public String getAlt() {
return getWrappedElement().getAttribute("alt");
}
/**
* Click on image
*/
public void click() {
getWrappedElement().click();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy