1

I am implementing code where need to be performed right using selenium driver. I have searched, there are plenty of answers but i can't find the relevant answers for right click in NODE JS. How can i perform right click in node js ?

3
  • 1
    Possible duplicate of How can I emulate right-click in the node.js selenium-webdriver? Commented Nov 10, 2017 at 7:18
  • thanks for the reply. checking it. Commented Nov 10, 2017 at 7:38
  • driver.actions().click(element1, input.Button.RIGHT).perform(); i have understand that "element1" is id but i am getting error "input is not defined". what to do now ? please guide. Commented Nov 10, 2017 at 7:49

1 Answer 1

1

Giving answer using this link

click( opt_elementOrButton, opt_button ) 

For Complete Info: document are here

opt_elementOrButton

Either the element to interact with or the button to click with.

opt_button

The button to use. Defaults to input.Button.RIGHT.

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

4 Comments

hi i have added below code to perform right click but its giving an error. driver.actions().click(driver.findElement(By.tagName('canvas')),input.Button.right).perform(); ERROR:"Cannot read property 'Button' of undefined" can you please me to get rid of this error?
thank you so much for help. Error has been removed just got it.
Please upvot le and accpt as a answer
I get the same error: ERROR:"Cannot read property 'Button' of undefined" . what did you do to get rid of this error?

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.