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 ?
-
1Possible duplicate of How can I emulate right-click in the node.js selenium-webdriver?NarendraR– NarendraR2017-11-10 07:18:56 +00:00Commented Nov 10, 2017 at 7:18
-
thanks for the reply. checking it.argo– argo2017-11-10 07:38:29 +00:00Commented 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.argo– argo2017-11-10 07:49:34 +00:00Commented Nov 10, 2017 at 7:49
Add a comment
|
1 Answer
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.
4 Comments
argo
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?
argo
thank you so much for help. Error has been removed just got it.
iamsankalp89
Please upvot le and accpt as a answer
Brenda Olivia Martis
I get the same error: ERROR:"Cannot read property 'Button' of undefined" . what did you do to get rid of this error?