Короче решилось все просто
public abstract class BaseUITest1 {
protected static WebDriver driver;
@BeforeAll
public static void setUp() {
WebDriverManager.chromedriver().setup();
ChromeOptions options = new ChromeOptions();
options.addArguments("--disable-notifications");
options.addArguments("--disable-popup-blocking");
options.addArguments("--start-maximized");
options.setPageLoadStrategy(PageLoadStrategy.NORMAL);
driver = new ChromeDriver(options);
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
driver.get(BASE_URL);
new AuthorizationPage(driver)
.AuthoriseScenario(Configuration.LOGIN, Configuration.PASSWORD)
.clickFirstAssistantCard();
}
@AfterAll
public static void tearDown() {
driver.quit();
}
}
package Features.Interface;
import Base.BaseUITest;
import Base.BaseUITest1;
import Common.Configuration;
import Pages.AuthorizationPage;
import Pages.ConductorPage;
import io.qameta.allure.Feature;
import io.qameta.allure.Severity;
import io.qameta.allure.SeverityLevel;
import org.junit.jupiter.api.*;
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
@Feature("Conductor")
public class ConductorTest extends BaseUITest1 {
@Test
@Order(1)
@DisplayName("Добавление навыка")
@Severity(SeverityLevel.CRITICAL)
public void AddingSkill() {
new ConductorPage(driver)
.hoverMouseSkillsSection()
.clickPlusButtonSkill()
.clickNameNavElement()
.clearNameNavElement()
.pause(1)
.inputNameNavElement("Навык тест")
.pushEnter()
.pause(3)
.checkAssertSkill();
}
@Test
@Order(2)
@DisplayName("Переименование навыка")
@Severity(SeverityLevel.TRIVIAL)
public void RenamingSkill() {
new ConductorPage(driver)
.pushRightMouseButtonExplorer()
.clickContextButton2()
.inputNewNameElement("Навык тест новый")
.pushEnterRename()
.pause(3)
.checkNewNameSkill();
}
}