I am trying to simulate the actions of right-click at any place in the page (not specific element) and arrow down twice and then press enter
With driver
.Wait 2000
.Actions.ClickContext
.SendKeys .Keys.ArrowDown
.SendKeys .Keys.ArrowDown
.SendKeys .Keys.Enter
.Actions.Perform
.Wait 2000
End With
I am not sure how to do that in general. I am using vba and selenium.
Playing around I could display the right-click menu using this .Actions.ClickContext(.FindElementByXPath("//body")).Perform
but couldn’t click on Inspect from the menu
I have found another way to open the developer tools (credentials should be @undetected Selenium)
Dim wsh As Object, i As Long
Set wsh = CreateObject("WScript.Shell")
With bot
.AddArgument "--auto-open-devtools-for-tabs"
.Start "Chrome"
.Window.Maximize
.Wait 1000
For i = 1 To 3
wsh.SendKeys "^]"
.Wait 200
Next i
For i = 1 To 4
wsh.SendKeys "{TAB}"
.Wait 200
Next i
wsh.SendKeys "{RIGHT}"
wsh.SendKeys "{ENTER}"
.Get sURL & "login"
But I welcome any more ideas and solutions
1