I read somewhere that java Robot class can be used to simulate this.
But this always does for whichever window that has focus.
Att
Leonardo Barba Galani
Tester!
Java, Selenium e Coca Cola (http://www.leonardobg.com.br)
>--
>You received this message because you are subscribed to the Google Groups "webdriver" group.
>To post to this group, send email to webd...@googlegroups.com.
>To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
>For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.
new Actions(driver).keyDown(Keys.CONTROL).keyDown(Keys.F5).keyUp(Keys.CONTROL).keyUp(Keys.F5).perform();
I havent tested this to ascertain that this is working fine, but am guessing that this should work.
Actions actionObject = new Actions(driver);
actionObject.keyDown(Keys.CONTROL).keyDown(Keys.F5).keyUp(Keys.CONTROL).keyU
p(Keys.F5).perform();
-----Original Message-----
From: webd...@googlegroups.com [mailto:webd...@googlegroups.com] On
Behalf Of Mattayi
Sent: 30 November 2011 12:32
To: webdriver
Subject: [webdriver] Press control+F5 using webdriver
--
You received this message because you are subscribed to the Google Groups
"webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to
webdriver+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/webdriver?hl=en.
--
This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
If you have received this email in error please notify postm...@ardescosolutions.com
Ctrl is a modifier key but F5 is not. You probably want to use:
actionObject.keyDown(Keys.CONTROL).sendKeys(Keys.F5).keyUp(Keys.CONTROL).perform();
Darrell
On Nov 30, 9:32 am, Robert <restag...@gmail.com> wrote:
> Krishnan,
>
> When I attempt to use the example code, I get the following...what does
> this mean?
>
> java.lang.IllegalArgumentException: Key Down / Up events only make sense
> for modifier keys.
> at
> org.openqa.selenium.interactions.internal.SingleKeyAction.<init>(SingleKeyA ction.java:46)
I too am getting the same error message
java.lang.IllegalArgumentException: Key Down / Up events only make
sense
for modifier keys.
On Dec 1, 8:30 pm, Krishnan Mahadevan
--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver.
For more options, visit https://groups.google.com/groups/opt_out.