use of com.adobe.cq.testing.selenium.pagewidgets.coral.CoralPopOver in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class ContentFragmentEditDialog 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.CoralPopOver 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.CoralPopOver in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class TitleEditDialog method getTitleTypeSelectList.
/**
* @return list of the related coral popover that is opened.
*/
public CoralSelectList getTitleTypeSelectList() {
CoralSelectList coralSelectList = new CoralSelectList($(titleType));
if (coralSelectList.isVisible()) {
return coralSelectList;
} else {
CoralPopOver popOver = CoralPopOver.firstOpened();
popOver.waitVisible();
waitForElementAnimationFinished(popOver.getCssSelector());
return new CoralSelectList(popOver.element());
}
}
Aggregations