use of com.adobe.cq.testing.selenium.pagewidgets.coral.CoralSelectList in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ContentFragmentListEditDialog method addElement.
public void addElement(String value) {
$("[coral-multifield-add]").click();
$$("coral-multifield-item").last().$(elementNameSelectButton).click();
CoralSelectList coralSelectList = new CoralSelectList($$("coral-multifield-item").last().$("coral-select[name='./elementNames']"));
if (!coralSelectList.isVisible()) {
CoralPopOver popOver = CoralPopOver.firstOpened();
popOver.waitVisible();
Helpers.waitForElementAnimationFinished(popOver.getCssSelector());
coralSelectList = new CoralSelectList(popOver.element());
}
final WebDriver webDriver = WebDriverRunner.getWebDriver();
WebElement element = webDriver.findElement(By.cssSelector("coral-selectlist-item[value='" + value + "']"));
((JavascriptExecutor) webDriver).executeScript("arguments[0].scrollIntoView(true);", element);
coralSelectList.selectByValue(value);
}
use of com.adobe.cq.testing.selenium.pagewidgets.coral.CoralSelectList in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TitleEditDialog method isTitleTypesPresent.
public boolean isTitleTypesPresent(String[] sizes) throws InterruptedException {
openTitleTypeList();
boolean present = true;
for (int i = 0; i < sizes.length; i++) {
if (!$(String.format(titleWithSize, sizes[i])).isDisplayed()) {
present = false;
}
}
CoralSelectList coralSelectList = getTitleTypeSelectList();
coralSelectList.items().first().click();
return present;
}
use of com.adobe.cq.testing.selenium.pagewidgets.coral.CoralSelectList in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TitleEditDialog method isTitleTypePresent.
public boolean isTitleTypePresent(String size) throws InterruptedException {
openTitleTypeList();
CoralSelectList coralSelectList = getTitleTypeSelectList();
boolean present = false;
for (int i = 0; i < coralSelectList.items().size(); i++) {
if (coralSelectList.items().get(i).getValue().trim().equals("h" + size)) {
present = true;
}
}
// click default
coralSelectList.items().first().click();
return present;
}
use of com.adobe.cq.testing.selenium.pagewidgets.coral.CoralSelectList in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class FormContainerEditDialog method selectActionType.
public void selectActionType(String action) {
// Open selectlist
$("[name='./actionType'] > button").click();
CoralSelectList coralSelectList = new CoralSelectList($("[name='./actionType']"));
if (!coralSelectList.isVisible()) {
CoralSelect selectList = new CoralSelect("name='./actionType'");
coralSelectList = selectList.openSelectList();
}
final WebDriver webDriver = WebDriverRunner.getWebDriver();
WebElement element = webDriver.findElement(By.cssSelector("coral-selectlist-item[value='" + action + "']"));
((JavascriptExecutor) webDriver).executeScript("arguments[0].scrollIntoView(true);", element);
coralSelectList.selectByValue(action);
}
use of com.adobe.cq.testing.selenium.pagewidgets.coral.CoralSelectList in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class Page method setRobotsTags.
public void setRobotsTags(String... values) {
CoralSelect selectList = new CoralSelect(robotsTags);
CoralSelectList coralSelectList = selectList.openSelectList();
for (String value : values) {
coralSelectList.selectByValue(value);
}
}
Aggregations