Rukavishnikova #14
@ -1,31 +1,27 @@
|
||||
package ru.oriflame.pages;
|
||||
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.WebElement;
|
||||
import org.openqa.selenium.support.FindBy;
|
||||
import org.openqa.selenium.support.PageFactory;
|
||||
|
||||
public class MultiMedia {
|
||||
|
||||
public WebDriver driver;
|
||||
|
||||
public MultiMedia(WebDriver driver) {
|
||||
PageFactory.initElements(driver, this);
|
||||
this.driver = driver;
|
||||
}
|
||||
|
||||
@FindBy(xpath = "//*[@id=\"block-block-5\"]/p/a")
|
||||
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() {
|
||||
playVideo.click();
|
||||
}
|
||||
|
||||
public void closeButton() {
|
||||
closeButton.click();
|
||||
public boolean assertVideoPlay() {
|
||||
return driver.findElement(By.cssSelector("body > div.mfp-wrap.mfp-close-btn-in.mfp-auto-cursor.mfp-ready > div > div > div > button")).isDisplayed();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user