Selenium:Chrome driver(NodeJS APP): right-click and select any option
42 views
Skip to first unread message
Uttam verma
unread,
Jun 7, 2016, 7:30:32 AM6/7/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Selenium Users
I am automating right-click and select menu options feature on a application (node.js). Right-click is successful(as shown in attached image) but not able to select any options from menu. We also tried keyboard Up and down operations using ActionChains module with no success. I am using chromedriver for nodejs.
Selenium Version : 2.53.2
Code to right-click and select 3rd option:
from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains
self._browser = webdriver.Chrome("C:\\NodeWebKit\\chromedriver.exe") # Identifying the user user = self._browser.find_element_by_xpath("//div[@class='first-name' and contains(text(), 'AUSER_189527')]") # selecting the user by clicking on it user.click() # right-click and select 3rd option ActionChains(self._browser).context_click(user).send_keys(Keys.ARROW_DOWN).send_keys(Keys.ARROW_DOWN).send_keys(Keys.ARROW_DOWN).send_keys(Keys.RETURN).perform()