37 lines
816 B
Java
37 lines
816 B
Java
package page;
|
|
|
|
import org.junit.jupiter.api.Assertions;
|
|
import org.openqa.selenium.WebDriver;
|
|
import org.openqa.selenium.WebElement;
|
|
import org.openqa.selenium.support.FindBy;
|
|
|
|
import java.io.File;
|
|
import java.util.List;
|
|
|
|
public class PagePriceList {
|
|
WebDriver driver;
|
|
|
|
@FindBy(className = "btn")
|
|
private WebElement elementBtn;
|
|
|
|
public PagePriceList(WebDriver driver) {
|
|
this.driver = driver;
|
|
}
|
|
|
|
public String getFileName() {
|
|
String fileName = elementBtn.getAttribute("href");
|
|
fileName = fileName.substring(fileName.lastIndexOf("/") + 1);
|
|
return fileName;
|
|
}
|
|
|
|
public void clickBtn() {
|
|
elementBtn.click();
|
|
try {
|
|
Thread.sleep(5000);
|
|
} catch (InterruptedException e) {
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
}
|