Hello Moritz,

I tried

Actions action = new Actions(driver)
action.sendKeys(Keys.CONTROL + "m").build().perform()


but it does not work. Any idea what's wrong? Or any other suggestions?

Thank you,
Roland


On Tuesday, March 5, 2019 at 12:54:22 PM UTC+1, Moritz Kobel wrote:
>
> Hello Roland, 
>
> Am Dienstag den 05. März 2019 schrieb [email protected] <javascript:>: 
>
> > could please someone help me? 
> > 
> > how can I use shortcuts like "CTRL+m" on webpages? 
> > 
> > I tried 
> > 
> > 1: $('div.neo-layout') << Keys.chord(Keys.CONTROL, "m") 
> >   
> > 2: 
> driver.findElement(By.cssSelector('div.neo-layout')).sendKeys((Keys.CONTROL 
> > + "m")) 
> > 
> > 3: WebElement element = 
> driver.findElement(By.cssSelector('div.neo-layout' 
> > )); 
> > 
> > new Actions(driver).moveToElement(element).sendKeys(Keys.CONTROL + 
> "m").perform(); 
> > 
> > 
> > but nothing works? 
> > 
> > the shortcut "CTRL+m" does not depend on any page element, it should 
> help 
> > to show a menu. 
>
> In one of my tests, I have a global shortcut m, a: 
>
>   Actions action = new Actions(driver) 
>   action.sendKeys('ma').build().perform() 
>
> Does this work for you? 
>
>
> - Moritz 
>
>
> -- 
>                            <\         __@  __@ 
>                              \ __   _-\<, -\<,_ 
> http://www.tandemblog.ch     0<==`-(-)/---|/-(_) 
>

-- 
You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/aa2705b5-ac87-404a-aa3b-d85923623e50%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to