You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating system : Win7
.Net Framework version : 2.0.7045
Office Version : 2003
SeleniumWrapper version : 1.0.11.0
Please could you provide sample VBA code, that will simulate physically
pressing keyboard keys (ESc, Enter) and possibly also instruction how other
keys can be pressed.
Original issue reported on code.google.com by [email protected] on 6 May 2013 at 8:30
The text was updated successfully, but these errors were encountered:
There you go :
Dim selenium As New SeleniumWrapper.WebDriver
Dim Keys As New SeleniumWrapper.Keys
selenium.Start "firefox", "http://www.google.com"
selenium.Open "search?q=eiffel+tower"
selenium.SendKeys Chr(9) // ascii code for escape
Or
selenium.SendKeys Keys.Escape // Send escape to the active element
Or
selenium.findElementById("id").SendKeys Keys.Enter 'Send enter to the element
Original comment by florentbr on 6 May 2013 at 12:53
To close a windows popup, you first have to to use the switchToWindow command.
Then you can try to send the escape key :
selenium.switchToWindow "windows-name"
selenium.sendKeys Keys.Escape
For the "id=x-auto-32", you can use a CSS selector with partial id :
selenium.findElementByCssSelector("a[id^=x-auto-]").click
Original comment by florentbr on 10 Jul 2013 at 11:00
Original issue reported on code.google.com by
[email protected]
on 6 May 2013 at 8:30The text was updated successfully, but these errors were encountered: