Example usage for org.openqa.selenium.interactions Actions contextClick

List of usage examples for org.openqa.selenium.interactions Actions contextClick

Introduction

In this page you can find the example usage for org.openqa.selenium.interactions Actions contextClick.

Prototype

public Actions contextClick(WebElement target) 

Source Link

Document

Performs a context-click at middle of the given element.

Usage

From source file:com.autocognite.selenium.lib.SeleniumWebUiDriver.java

License:Apache License

@Override
public void rightClick(WebElement element) throws Exception {
    Actions builder = getActionChain();
    builder.contextClick(element).perform();
}

From source file:com.chtr.tmoauto.webui.CommonFunctions.java

License:Open Source License

@Override
public void rightClick(String locator) {
    WebElement e1 = elementToBeClickable(locator);
    Actions action = new Actions(webDriver);
    action.contextClick(e1).build().perform();
    delay(FIVE);//from   ww  w . j  a  va 2s.c  om
}

From source file:com.constellio.sdk.tests.selenium.adapters.base.WebElementAdapter.java

License:Open Source License

public void rightClick() {
    WebElement webElement = getAdaptedSeleniumElement();
    Actions oAction = new Actions(webDriver.getAdaptedDriver());
    oAction.moveToElement(webElement);// w w  w . j  av  a  2s  . co m
    oAction.contextClick(webElement).build().perform();
}

From source file:com.epam.jdi.uitests.mobile.appium.elements.base.Element.java

License:Open Source License

public void rightClick() {
    invoker.doJAction("Right click on Element", () -> {
        Actions builder = new Actions(getDriver());
        builder.contextClick(getWebElement()).perform();
    });/* w  w  w.  ja v  a2s. c  om*/
}

From source file:com.ggasoftware.jdiuitest.web.selenium.elements.base.Element.java

License:Open Source License

public void rightClick() {
    invoker.doJAction("Right click on Element", () -> {
        getWebElement().getSize(); //for scroll to object
        Actions builder = new Actions(getDriver());
        builder.contextClick(getWebElement()).perform();
    });/*from   www  . j  a v  a  2 s .c  om*/
}

From source file:com.ggasoftware.jdi_ui_tests.elements.base.Element.java

License:Open Source License

public void rightClick() {
    doJAction("Right click on element", () -> {
        getWebElement().getSize(); //for scroll to object
        Actions builder = new Actions(getDriver());
        builder.contextClick(getWebElement()).perform();
    });/*  w ww . j a  v  a  2  s .  c o m*/
}

From source file:com.ggasoftware.uitest.control.Element.java

License:Open Source License

/**
 * Performs a right-click at the current mouse location.
 *
 * @return Parent instance// ww  w . j a  v a  2  s .c  om
 */
public ParentPanel rightClick() {
    getWebElement().getSize(); //for scroll to object
    logAction(this, getParentClassName(), "rightClick");
    Actions builder = new Actions(getDriver());
    builder.contextClick(getWebElement()).perform();
    return parent;
}

From source file:com.jase.knife.BrowserEmulator.java

License:Apache License

/**
 * Right click element.//from  ww w .j av  a2  s  .  com
 * @param xpath
 * the element's xpath
 */
public void rightClick(String xpath) {
    waitElement(xpath, timeout);

    Actions action = new Actions(browser);
    WebElement we = browser.findElement(By.xpath(xpath));

    action.contextClick(we).perform();
}

From source file:com.mkl.websuites.internal.command.impl.click.ContextClickCommand.java

License:Apache License

@Override
protected void doOperationOnElement(WebElement elem) {
    Actions actions = new Actions(browser);
    actions.contextClick(elem).perform();
}

From source file:com.osbitools.ws.shared.prj.xui.GenericPrjMgrGuiWebTest.java

License:LGPL

/**
 * Right click on web element and return reference on context menu
 * /*  w w  w  .jav a2 s  .c  o  m*/
 * @param el WebElement
 * @return reference on context menu
 */
public WebElement ctxMenuClick(WebElement el) {
    Actions action = new Actions(driver);
    action.contextClick(el).build().perform();
    WebElement ctx = driver.findElement(By.className("contextMenuPlugin"));
    assertNotNull(ctx);

    return ctx;
}