This is a migrated thread and some comments may be shown as answers.

Enter key closes browser

1 Answer 105 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Weston
Top achievements
Rank 1
Weston asked on 24 Jan 2014, 10:16 PM
Hello,

I am using Chrome and have a form where I enter an ID into a text box and press enter to query the data.
It records as

 Keyboard (KeyPress) - Enter (1 times) on 'PIDText'

However on playback it errors and closes the browser. I did not see an actual error in the dos window, only in the test tool where the script failed. I also tried to tried to add a project reference to System.Windows.Forms, but that didn't help either.

Anyone have a solution or work around?

Thank you,
Weston

1 Answer, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 29 Jan 2014, 12:59 PM
Hello Weston,

Instead of hitting Enter on specific element as recorded in your case you can simply add a coded step on the same place that presses the Enter key. Since you've already added the assembly reference to System.Windows.Forms.dll you can simply create the coded step as shown in this short video.

I am providing you the code from the step for your reference:

Manager.Desktop.KeyBoard.KeyPress(Keys.Enter);


Regards,
Ivaylo
Telerik
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Weston
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Share this question
or