46 lines
931 B
Java
46 lines
931 B
Java
package page;
|
|
|
|
import org.openqa.selenium.WebDriver;
|
|
import org.openqa.selenium.WebElement;
|
|
import org.openqa.selenium.support.FindBy;
|
|
|
|
public class MoviePage {
|
|
WebDriver driver;
|
|
|
|
@FindBy(css = "#actorList a")
|
|
private WebElement infoElement;
|
|
|
|
@FindBy(css = ".ya-share2__list a")
|
|
private WebElement socialElement;
|
|
|
|
@FindBy(id = "btn_fav_film")
|
|
private WebElement buttonLike;
|
|
|
|
@FindBy(id = "ui_notice_container")
|
|
private WebElement infoError;
|
|
|
|
public MoviePage(WebDriver driver) {
|
|
this.driver = driver;
|
|
}
|
|
|
|
public void clickInfo() {
|
|
infoElement.click();
|
|
}
|
|
|
|
public void clickSocial() {
|
|
socialElement.click();
|
|
}
|
|
|
|
public void clickLike() {
|
|
buttonLike.click();
|
|
}
|
|
|
|
public boolean isErrorLike() {
|
|
return infoError.isDisplayed();
|
|
}
|
|
|
|
public boolean isMoviePagePresent() {
|
|
return infoElement.isDisplayed();
|
|
}
|
|
}
|