• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 415
  • Last Modified:

Click 'Enter' key using java code

Hi,

I am working on automating a website in which a message box pops up when we do something on the website. This message box comes up with OK and Cancel buttons.

Is there any way that I can use the SEND KEYS i.e. simulate the 'Enter' key on this message box.

Note:
1. There is no way to find the property of the message box.
2. The only method is to click 'Enter' key when this message box appears.

I am looking for java code that can click the 'Enter' key when this message box appears.
Kindly provide your feedback ASAP.
Thanks
0
searchsanjaysharma
Asked:
searchsanjaysharma
  • 2
2 Solutions
 
aegis007Commented:
Use this 'java.awt.event.keyPressed' with the OK button to map that with the Enter key
0
 
searchsanjaysharmaAuthor Commented:
ok
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now