aboutsummaryrefslogtreecommitdiffstats
path: root/vid-automation/src/main/java/vid/automation/test/sections/TestEnvironmentPage.java
blob: 71c6e0bd4fc9d3287ae666fa54bd4bc6b305a617 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package vid.automation.test.sections;

import org.onap.sdc.ci.tests.utilities.GeneralUIUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.testng.Assert;
import vid.automation.test.Constants;
import vid.automation.test.infra.Click;
import vid.automation.test.infra.Get;

import java.util.List;

import static org.junit.Assert.assertEquals;

public class TestEnvironmentPage extends VidBasePage {

    public static void clickTestEnvironmentActivate(String envId) {
        getTestEnvironmentActivationButton(envId).click();
    }

    public static void clickTestEnvironmentDeactivate(String envId) {
        getTestEnvironmentDeactivationButton(envId).click();
    }

    public static WebElement getTestEnvironmentActivationButton(String envId) {
        WebElement webElement = Get.byId(Constants.TestEnvironments.activateButtonIdPrefix + envId);
        return webElement;
    }

    public static WebElement getTestEnvironmentDeactivationButton(String envId) {
        WebElement webElement = Get.byId(Constants.TestEnvironments.deactivateButtonIdPrefix + envId);
        return webElement;
    }
    
    public static WebElement getTestEnvironmentAttachButton(String envId) {
        WebElement webElement = Get.byId(Constants.TestEnvironments.attachButtonIdPrefix + envId);
        return webElement;
    }
}