SeleniumBasic icon indicating copy to clipboard operation
SeleniumBasic copied to clipboard

Unable to select right click menus

Open balajisekar opened this issue 8 years ago • 6 comments

I am struggling how to select second item of the context click menu. Someone help on this.

Sub Macro1() Dim driver As New Selenium.WebDriver Dim key As New Selenium.Keys driver.Start "chrome" driver.Get "https://www.linkedin.com/company/gigaclear" driver.Wait (3000) driver.FindElementByCss("#biz-follow-mod > div > div > p > strong").ClickDouble driver.FindElementByCss("#biz-follow-mod > div > div > p > strong").ClickContext driver.Wait (3000) driver.SendKeys (key.Down) driver.SendKeys (key.Down) driver.SendKeys (key.Space) driver.Wait (3000) End Sub

balajisekar avatar Mar 04 '16 20:03 balajisekar

Can you provide a little bit more information on what you are trying to achieve?

florentbr avatar Mar 05 '16 11:03 florentbr

My main goal of this coding is to right click the given element value and select one of the option from the right click menu.

balajisekar avatar Mar 06 '16 03:03 balajisekar

I got that from the first post. It would be usefully to know which element is supposed to get the context menu and which action you want to select in the context menu.

florentbr avatar Mar 07 '16 10:03 florentbr

Css Selector: #biz-follow-mod > div > div > p > strong This element is need to do the right click and select the second context menu from the list. image

image

balajisekar avatar Mar 07 '16 15:03 balajisekar

Anyone have any luck on this? Thanks! Dan

dantheinfoman avatar Aug 24 '18 18:08 dantheinfoman

usando selenium em VBA.

bot.FindElementByCss("#image-control > img").ClickContext 'CreateObject("wscript.shell").SendKeys "+{F10}" 'Right click mouse, bad using Application.Wait Now + TimeValue("00:00:01") SendKeys "{ENTER}", True Application.Wait Now + TimeValue("00:00:01") SendKeys "{ENTER}", True Application.Wait Now + TimeValue("00:00:02")

W-Fonseca avatar Nov 06 '20 23:11 W-Fonseca