How to select the Context Menu option when doing a rightclick
Describe your question with as much detail as possible
I am fairly new to webdriverio and I am trying to select an option on the right click menu. I am able to do the right click however when using browser.keys('ArrowDown') it doesn't seem to highlight anything in the menu. I've tried to search about this and on the forum the only way to select the context menu options are arrow buttons.
If it's about a specific piece of code, try and include some of it to support your question. below is the command I used to right click and pressing arrow down:
await this.browser.keys('Control');
await this.browser.click(element);
await this.browser.keys('Control'); // to release the control button
await this.browser.keys('ArrowDown');
It is achieving the right click but it will not select any options in the menu. I also used the key's codepoint but still the same. My original goal is to paste something whatever is in the clipboard however the browser.keys(['Meta', 'v']); is not working since I'm using chrome. so the option that I have is to right click and select option paste.
Environment (please complete the following information):
- WebdriverIO version: 4.14.2
- **Node.js version: 8.11.2
- NPM version: 6.4.1
- Browser name and version: Chrome 70.0.3538.102
- Platform name and version: Mac OSX 10.13.6
Hi @michaelseno
This is a usage question, please ask these kind of question on our Gitter channel.
Closing it here
Describe your question with as much detail as possible I am fairly new to webdriverio and I am trying to select an option on the right click menu. I am able to do the right click however when using
browser.keys('ArrowDown')it doesn't seem to highlight anything in the menu. I've tried to search about this and on the forum the only way to select the context menu options are arrow buttons.If it's about a specific piece of code, try and include some of it to support your question. below is the command I used to right click and pressing arrow down:
await this.browser.keys('Control'); await this.browser.click(element); await this.browser.keys('Control'); // to release the control button await this.browser.keys('ArrowDown');It is achieving the right click but it will not select any options in the menu. I also used the key's codepoint but still the same. My original goal is to paste something whatever is in the clipboard however the
browser.keys(['Meta', 'v']);is not working since I'm using chrome. so the option that I have is to right click and select optionpaste.Environment (please complete the following information):
- WebdriverIO version: 4.14.2
- **Node.js version: 8.11.2
- NPM version: 6.4.1
- Browser name and version: Chrome 70.0.3538.102
- Platform name and version: Mac OSX 10.13.6
Hello ,have you found the solution ? i have been trying from 1 week to do this
@arun-369 you can't access the browser context menu.
Could you please let me know, How you have performed right click there?