How do i simulate what happens when a user press ENTER?
User fills in login information and while password field has focus hits enter to login.
I need to automate that scenario, but i can't use Desktop.KeyBoard because it has to work on a locked screen.
How can i do that using Telerik?
I know selenium can do something like .Sendkeys("\n"); for a ENTER key. (which works on locked screens)
10 Answers, 1 is accepted
I don't believe a true, desktop keyboard click can be simulated on a locked desktop with any UI automation tool.
What should work is a DOM click (which is different from a desktop click that simulates a physical user).
You can implement a DOM click by finding the "Submit" button in code:
the Telerik team
I know i can click the submit button, but what i was looking for is a way to automatically test that if a user does the following:
That the user is then logged in, am i to understand that Telerik cannot test this?
If it's the case that Telerik have no way of simulating anything similar to a ENTER hit without running on a open screen then i have another problem.
How do i handle a search field with no click button? A text field that conducts search when ENTER is pressed but with no UI button to click??
Again remember it's a requirement that this can be done on locked screens.
Did some more digging.
This code will do the trick in selenium, it may not be the perfect simulation but it's good enough to find a bug which is about some login forms doesn't submit on ENTER and others do.
And that code will run with or without locked screen just the same
I hope you can help find a way Telerik can solve the problem so I don't have to do manual regression test of this.
I would like to step in for a moment and just clarify a couple of points.
1) Yes Test Studio can simulate pressing the Enter key. Our recorder will record it automatically and add it as a non-coded test step. This can also be done in code this way:
2) No Test Studio (and most UI automation tools) are not able to do anything with the keyboard or mouse input events on a locked machine. This is a Windows security limitation. When the machine is in the locked state Windows removes the "Interactive desktop" permission.
A common way to work around this is to a VNC type of product. These products act like a video card such that when you disconnect the VNC connection without logging off, Windows doesn't actually enter the "locked" state leaving UI automation tools free to run unhindered on a headless machine.
I hope that clarifies the situation we're dealing with here.
the Telerik team
But it doesn't really help me much :(.
Do Telerik have any plan of implementing a feature similar to what Selenium does? lets just call it FakeEnter()?
I understand the dilemma. Is there a reason/problem preventing you from trying a VNC product?
Yes, eventually we will be implementing the ability for tests to run unhindered on a locked machine. We have already done some initial investigation on what it would take and have determined it is not a trivial change to make it work reliably across all versions of Windows.
the Telerik team
Thanks for the response.
Regarding VNC I haven't looked into it yet, do you have a link to where I can read about it you would recommend?
Any test that requires moving the mouse or sending key strokes still requires an unlocked desktop.
Telerik tests are not the only types affected by this Windows limitation. You will find this is a general problem with any tool that performs UI testing.
Thank you for your understandings.
Test Studio Trainings