--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
You could always use the Keys object if you aren’t sure what key code is required:
import org.openqa.selenium.Keys;
selenium.keyPress("id=foo", “\\” + Keys.ESCAPE.toString());
Mike
--
I have tried import your package and run your command, but selenium
doesn't recognize key? I don't know why
Please see in screen shot
http://www.uphinhnhanh.com/images/52Image_3.png
On Nov 10, 3:17 am, "Mark Collin" <m...@ardescosolutions.com> wrote:
> Not sure, I think you do with the Selenium 1 API but I don't use that any
> more.
>
> -----Original Message-----
> From: seleniu...@googlegroups.com
>
> [mailto:seleniu...@googlegroups.com] On Behalf Of Mike
> Sent: 09 November 2011 18:36
> To: Selenium Users
> Subject: [selenium-users] Re: How to press ESCAPEkeyin JAVA
>
> In this case, you shouldn't need the "\\", should you? The
> Keys.ESCAPE.toString() should produce a string with an ASCII 27 in it, I
> would think, or does it simply produce a string with the number in it?
>
> Mike
>
> On Nov 9, 6:06 am, "Mark Collin" <m...@ardescosolutions.com> wrote:
> > You could always use the Keys object if you aren't sure whatkeycode
> > is
> > required:
>
> > import org.openqa.selenium.Keys;
>
> > selenium.keyPress("id=foo", "\\" + Keys.ESCAPE.toString());
>
> --
> You received this message because you are subscribed to the Google Groups
> "Selenium Users" group.
> To post to this group,sendemail to seleniu...@googlegroups.com.
> To unsubscribe from this group,sendemail to
> selenium-user...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/selenium-users?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 postmas...@ardescosolutions.com
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
Your code is on Python, I'm concerning on Java
Hi Oliver,
Can you please try it out with this snipet and let me know.......
Page
.driver().findElement(By.xpath("//textarea[@name='element']")).sendKeys(Keys.ESCAPE);Dear Saran,
Your code is on Python, I'm concerning on Java
do you have other suggestions?
Please notice: I'm working on RC so that code with Webdriver doesn't
work
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.