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

Issue with Desktop.Keyboard

1 Answer 112 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Dmitry
Top achievements
Rank 1
Dmitry asked on 09 Sep 2016, 02:22 PM

Hello,

Whever I use Desktop.Keyboard.Keypress, it tries to send the keys to Vidual Studio, instead of the browser being run by Manager.

However, Desktop.Mouse.Click sends its events to the browser. Has anyone had the same issue?

I tried paying with manager instances but it did not help:

Instance.Desktop.KeyBoard.TypeText("google.com");

Manager.Current.Desktop.KeyBoard.KeyPress(System.Windows.Forms.Keys.Tab, 1000);

My mouse click code is:

Instance.Desktop.Mouse.Click(MouseClickType.LeftClick, urlCell.GetRectangle());       

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 14 Sep 2016, 10:54 AM
Hi Dmitry,

The desktop actions are sent to the currently active element during the execution. Probably the active element before sending the key strokes is not the one you expect it to be. Since I was not able to reproduce the same behavior I would like to ask you for a short video demonstrating the issue and possibly a sample code (we recommend Jing as a free and easy to share online video recorder). 

I hope to hear from you soon! 

Regards,
Elena Tsvetkova
Telerik by Progress
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Dmitry
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or