Question

Enter Key to a TextBox Object

Hello everyboody!

I'm developing a Bot wich fills some TextBoxes in a web application. After that, I have to simulate an Enter Key in one of these objetcs. However, I realize that the TextBox object doesn't have the Send Key method or another one to simulate that event. Do you know how can I solve that?

Thank you for your attention!

Comments

Keep up to date on this post and subscribe to comments

June 17, 2019 - 9:03am

SendKeys() method is available only in windows adapter but not in web adapter. Hence, you need two adapters as clicking/filling values on website should be handled by web adapter and simulating ENTER key be handled by windows adapter. Always start Web adapter and then start windows adapter, then only Window screen controls can be interrogated.

Steps to Configure both Adapters:

1. Create a web adapter. In web adapter properties perform below changes.

2. Create a windows adapter. In windows adapter properties perform below changes.(in "Arguments" property specify "StartPage" property that you have specified in web adapter)

Steps to Start Interrogation:

1. Click on Start Interrogation button on Web Adapter. wait till bulls eye pops out.

2. Click on Start Interrogation button on Windows Adapter.

Note: Follow above steps in specified order.

Steps to Interrogate:

1. You will be having two bulls eye windows for two adapters. You should be able to interrogate Internet explorer frame using windows adapter bulls eye window, as specified in below screenshot.

2. Then Interrogate the Textboxes with webcontrol(this was already done from web adapter).

Steps to design Automation:

1. Fill the Texboxes with interrogated Textbox controls.

2. Then use focus() method of the Textbox control, as you need to click on Enter button after entering the values.

3. Then connect Sendkeys() method of windows frame control from windows adapter. Give parameter as {ENTER} or ~. 

Hope this helps, let me know if you have any queries.