0
var element1 = driver.findElement(webdriver.By.xpath('//*[@id="/Projects/_anchor"]'));

               driver.actions({bridge: true})                       
                .click( element1, webdriver.Button.RIGHT).perform();

I am trying above code but it's not giving me desired output i.e right click on element.

1 Answer 1

1
var element1 = driver.findElement(webdriver.By.xpath('//*[@id="/Projects/_anchor"]'));

driver.actions({bridge: true})                       
    .contextClick( element1, webdriver.Button.RIGHT).perform();

it's working for me.

Sign up to request clarification or add additional context in comments.

1 Comment

This TypeScript worked for me: // @ts-ignore this.driver.actions({bridge: true}).contextClick(clickableElement, Button.RIGHT).perform();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.