use of org.openqa.selenium.interactions.Actions in project selenium-tests by Wikia.
the class VisualEditModePageObject method selectFromContextMenu.
private void selectFromContextMenu(WebElement option) {
wait.forElementVisible(iframe);
driver.switchTo().frame(iframe);
Actions actions = new Actions(driver);
actions.contextClick(visualModeTable).build().perform();
driver.switchTo().defaultContent();
driver.switchTo().frame(contextFrame);
option.click();
driver.switchTo().defaultContent();
isElementOnPage(visualModeTable);
}
use of org.openqa.selenium.interactions.Actions in project selenium-tests by Wikia.
the class VideoFanTakeover method clickOnAdImage.
public void clickOnAdImage() {
runInAdFrame(() -> {
final By adImageTrigger = By.cssSelector("#adContainer a");
wait.forElementClickable(adImageTrigger);
//do not click in the middle of image, there might be click to play there
new Actions(driver).moveToElement(driver.findElement(adImageTrigger), 10, 10).click().build().perform();
PageObjectLogging.log("clickOnAdImage", "ad image clicked", true, driver);
});
}
use of org.openqa.selenium.interactions.Actions in project selenium-tests by Wikia.
the class VisualEditorPageObject method clickTransclusion.
public void clickTransclusion(int index, Transclusion transclusion) {
Point tempLocation = getTransclusionLocation(index, transclusion);
int xOffset = 10;
int yOffset = 10;
int tempLeft = tempLocation.x + xOffset;
int tempTop = tempLocation.y + yOffset;
editArea.click();
Actions actions = new Actions(driver);
actions.moveToElement(mainContent, tempLeft, tempTop).clickAndHold().release().build().perform();
WebElement contextEdit = contextMenu.findElement(contextMenuBy).findElement(contextEditBy);
wait.forElementVisible(contextEdit);
PageObjectLogging.log("clickTransclusion", "Clicked at X: " + tempLeft + ", Y: " + tempTop, true, driver);
}
use of org.openqa.selenium.interactions.Actions in project selenium-tests by Wikia.
the class VisualEditorPageObject method resizeMedia.
private void resizeMedia(int xOffSet, int yOffset) {
PageObjectLogging.log("resizeMedia", "Before resizing", true, driver);
selectMedia();
wait.forElementVisible(swResizeHandle);
Actions actions = new Actions(driver);
actions.dragAndDropBy(swResizeHandle, xOffSet, yOffset).build().perform();
PageObjectLogging.log("resizeMedia", "After resizing", true, driver);
}
use of org.openqa.selenium.interactions.Actions in project selenium-tests by Wikia.
the class VisualEditorPageObject method deleteTransclusion.
public void deleteTransclusion(int index, Transclusion transclusion) {
clickTransclusion(index, transclusion);
Actions actions2 = new Actions(driver);
actions2.sendKeys(Keys.DELETE).build().perform();
}
Aggregations