Rukavishnikova #14

Closed
kotenok-339 wants to merge 17 commits from Rukavishnikova into master
Showing only changes of commit ff9d57a5c6 - Show all commits

View File

@ -1,31 +1,27 @@
package ru.oriflame.pages; package ru.oriflame.pages;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement; import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
public class MultiMedia { public class MultiMedia {
public WebDriver driver; public WebDriver driver;
public MultiMedia(WebDriver driver) { public MultiMedia(WebDriver driver) {
PageFactory.initElements(driver, this);
this.driver = driver; this.driver = driver;
} }
@FindBy(xpath = "//*[@id=\"block-block-5\"]/p/a") @FindBy(xpath = "//*[@id=\"block-block-5\"]/p/a")
private WebElement playVideo; private WebElement playVideo;
@FindBy(css = "body > div.mfp-wrap.mfp-close-btn-in.mfp-auto-cursor.mfp-ready > div > div > div > button")
private WebElement closeButton;
public void playVideoElement() { public void playVideoElement() {
playVideo.click(); playVideo.click();
} }
public void closeButton() { public boolean assertVideoPlay() {
closeButton.click(); return driver.findElement(By.cssSelector("body > div.mfp-wrap.mfp-close-btn-in.mfp-auto-cursor.mfp-ready > div > div > div > button")).isDisplayed();
} }
} }