use of org.openqa.selenium.interactions.Actions in project geode by apache.
the class PulseBase method testTreeMapPopUpData.
public void testTreeMapPopUpData(String S1, String gridIcon) {
for (int i = 1; i <= 3; i++) {
searchByLinkAndClick(CLUSTER_VIEW_LABEL);
if (gridIcon.equals(SERVER_GROUP_GRID_ID)) {
WebElement ServerGroupRadio = getWebDriver().findElement(By.xpath("//label[@for='radio-servergroups']"));
ServerGroupRadio.click();
}
if (gridIcon.equals(REDUNDANCY_GRID_ID)) {
WebElement ServerGroupRadio = getWebDriver().findElement(By.xpath("//label[@for='radio-redundancyzones']"));
ServerGroupRadio.click();
}
searchByIdAndClick(gridIcon);
WebElement TreeMapMember = getWebDriver().findElement(By.xpath("//div[@id='" + S1 + "M" + (i) + "']/div"));
Actions builder = new Actions(getWebDriver());
builder.clickAndHold(TreeMapMember).perform();
int j = 1;
String CPUUsageM1temp = getWebDriver().findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div/div[2]/div")).getText();
String CPUUsageM1 = CPUUsageM1temp.replaceAll("[\\%]", "");
String cpuUsageM1 = JMXProperties.getInstance().getProperty("member.M" + (i) + ".cpuUsage");
assertEquals(cpuUsageM1, CPUUsageM1);
String MemoryUsageM1temp = getWebDriver().findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 1) + "]/div[2]/div")).getText();
String MemoryUsageM1 = MemoryUsageM1temp.replaceAll("MB", "");
String memoryUsageM1 = JMXProperties.getInstance().getProperty("member.M" + (i) + ".UsedMemory");
assertEquals(memoryUsageM1, MemoryUsageM1);
String LoadAvgM1 = getWebDriver().findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 2) + "]/div[2]/div")).getText();
String loadAvgM1 = JMXProperties.getInstance().getProperty("member.M" + (i) + ".loadAverage");
assertEquals(new DecimalFormat(PulseConstants.DECIMAL_FORMAT_PATTERN).format(Double.valueOf(loadAvgM1)), LoadAvgM1);
String ThreadsM1 = getWebDriver().findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 3) + "]/div[2]/div")).getText();
String threadsM1 = JMXProperties.getInstance().getProperty("member.M" + (i) + ".numThreads");
assertEquals(threadsM1, ThreadsM1);
String SocketsM1 = getWebDriver().findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 4) + "]/div[2]/div")).getText();
String socketsM1 = JMXProperties.getInstance().getProperty("member.M" + (i) + ".totalFileDescriptorOpen");
assertEquals(socketsM1, SocketsM1);
builder.moveToElement(TreeMapMember).release().perform();
}
}
use of org.openqa.selenium.interactions.Actions in project selenium-tests by Wikia.
the class VisualEditorMenu method clickStyleItemFromDropDown.
private void clickStyleItemFromDropDown(By styleBy) {
WebElement styleListElement = toolListDropDowns.get(STYLE_LIST);
WebElement styleItems = toolListItems.get(STYLE_LIST);
wait.forElementVisible(styleListElement);
Actions actions = new Actions(driver);
actions.click(styleListElement).click(styleItems.findElement(styleBy)).build().perform();
}
use of org.openqa.selenium.interactions.Actions in project selenium-tests by Wikia.
the class VisualEditorMenu method clickFormatting.
public void clickFormatting(By formatBy) {
wait.forElementClickable(formattingDropDown);
Actions actions = new Actions(driver);
actions.click(formattingDropDown).click(formattingDropDownItems.findElement(formatBy).findElement(menuItemBy)).build().perform();
}
use of org.openqa.selenium.interactions.Actions in project selenium-tests by Wikia.
the class VisualEditorMenu method clickItemFromDropDown.
private void clickItemFromDropDown(WebElement list, WebElement item, WebElement insertBy) {
wait.forElementClickable(list);
Actions actions = new Actions(driver);
actions.click(list).click(insertBy).build().perform();
}
use of org.openqa.selenium.interactions.Actions in project selenium-tests by Wikia.
the class ArticlePageObject method triggerEditCommentArea.
public MiniEditorComponentObject triggerEditCommentArea() {
jsActions.scrollToElement(allCommentsArea);
WebElement mostRecentComment = articleComments.get(0);
PageObjectLogging.log("First check", mostRecentComment.getText(), true);
JavascriptExecutor js = (JavascriptExecutor) driver;
WebElement editButton = mostRecentComment.findElement(By.cssSelector(EDIT_BUTTON_SELECTOR));
new Actions(driver).moveToElement(editButton).perform();
js.executeScript("arguments[0].querySelector(arguments[1]).click()", mostRecentComment, EDIT_BUTTON_SELECTOR);
return new MiniEditorComponentObject(driver);
}
Aggregations