Hello Roland, I assume the keys are combined to one string and executed one after another.
This could help you: action.sendKeys( Keys.chord(Keys.CONTROL, "m") ).build().perform() source: http://www.gebish.org/manual/current/#non-characters-e-g-delete-key-key-chords-etc ( I did not execute the code, but according to my understanding of the documentation and API specification, this could work ) - Moritz Am Dienstag den 05. März 2019 schrieb [email protected]: > 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. -- <\ __@ __@ \ __ _-\<, -\<,_ 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/20190305213439.GA23751%40aoraki.moosseedorf.kobelnet.intra. For more options, visit https://groups.google.com/d/optout.
