2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.onap.sdc.frontend.ci.tests.pages;
23 import org.onap.sdc.frontend.ci.tests.datatypes.DataTestIdEnum;
24 import org.onap.sdc.frontend.ci.tests.utilities.GeneralUIUtils;
25 import org.openqa.selenium.WebElement;
27 public class ToscaArtifactsPage extends DeploymentArtifactPage {
29 private ToscaArtifactsPage() {
33 public static String getArtifactName(int row) {
34 return GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.ToscaArtifactsScreenEnum.ARTIFACT_NAME.getValue() + row).getText();
37 public static String getArtifactType(int row) {
38 return GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.ToscaArtifactsScreenEnum.ARTIFACT_TYPE.getValue() + row).getText();
41 public static String getArtifactVersion(int row) {
42 return GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.ToscaArtifactsScreenEnum.ARTIFACT_VERSION.getValue() + row).getText();
45 public static WebElement getArtifactDetails(int row) {
46 return GeneralUIUtils.getWebElementByTestID(DataTestIdEnum.ToscaArtifactsScreenEnum.ARTIFACT_DETAILS.getValue() + row);
49 public static void downloadCsar() {
50 GeneralUIUtils.clickOnElementByTestId(DataTestIdEnum.ToscaArtifactsScreenEnum.DOWNLOAD_CSAR.getValue());
51 //GeneralUIUtils.ultimateWait();
54 public static void downloadTemplate() {
55 GeneralUIUtils.clickOnElementByTestId(DataTestIdEnum.ToscaArtifactsScreenEnum.TOSCA_TEMPLATE.getValue());
56 //GeneralUIUtils.ultimateWait();