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

Click() event do not work when test is runned on scheduler

3 Answers 281 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 08 Mar 2016, 02:59 PM

Hi,

Click() event do not work when test is runned on scheduler or when i minimize the remote desktop window(where the connection to the machine with test studio is).

If i'm leaving the window open and i run the test, everything works smooth.

I've enabled SimulateRealClick, still no changes.

The errors at log is next:

System.ComponentModel.Win32Exception (0x80004005): SendInput: Failed. Win32Error: 
   at ArtOfTest.WebAii.Win32.Win32NativeMethods.SendInputInternal(Input[] inputData)
   at ArtOfTest.WebAii.Win32.Mouse.Click(MouseClickType clickType, Int32 x, Int32 y, Int32 wheelDelta)
   at ArtOfTest.WebAii.Win32.Mouse.Click(MouseClickType clickType, Int32 x, Int32 y, Int32 wheelDelta)
   at ArtOfTest.WebAii.Win32.Mouse.Click(MouseClickType clickType, Point pointToClick)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.MouseClick()
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.ClickActionDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

 

 

PLEASE help.

Boyan Boev
Telerik team
commented on 16 Mar 2016, 03:08 PM

Hello Adam,

Happy to hear that you have found a solution.

If you need additional assistance please let us know.

Regards,
Boyan Boev
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!

3 Answers, 1 is accepted

Sort by
0
Briar
Top achievements
Rank 1
answered on 08 Mar 2016, 04:02 PM

Hi, Adam,

There is this possible solution:  http://docs.telerik.com/teststudio/knowledge-base/test-execution-kb/minimized-rdc.

However, I could not get it to work for me.  I always have to leave the remote desktop window open.

-Briar

Adam
Top achievements
Rank 1
commented on 09 Mar 2016, 07:34 AM

Hi Briar,

Thanks for the advice. I will try it.

But can you please tell me if your tests also fail when they are running on the remote machine? Because my are.

Thanks

-Adam

Briar
Top achievements
Rank 1
commented on 09 Mar 2016, 01:00 PM

Hi, Adam,

My experience has been if test scripts are running fine in Quick Execution mode, but not remotely, in remote mode the test list is running faster than the web application it is testing.  So you have to make adjustments in your scripts to slow them down and synchronize them with the web application.  For example, before actually initiating a click event, you check to make sure the button is enabled first.  If your application uses AJAX postbacks, you can utilize the AJAX timeout parameter to slow those particular steps down.  There is also the UseStepWaitOnElements to adjust the wait time with steps you know will always take more time.

There is more information here explaining this issue:  http://www.telerik.com/forums/test-lists-are-un-stable-while-quick-executions-are-stable#4SWHgAV0ikmPZ31phqEJLw

Hope this helps!

-Briar

0
Adam
Top achievements
Rank 1
answered on 09 Mar 2016, 03:01 PM

Hi Briar,

Telerik said that it's a known issue and i should try this: http://docs.telerik.com/teststudio/knowledge-base/scheduling-kb/keep-active-session

-Adam

Briar
Top achievements
Rank 1
commented on 10 Mar 2016, 01:46 PM

Leaving the remote desktop connection window open works for me but I'll keep this alternative solution in mind.  Thanks for the info, Adam!
Adam
Top achievements
Rank 1
commented on 14 Mar 2016, 07:37 AM

Found a solution, I rerecorded the test, and used the step from a newly recorded, it work perfectly. so looks like it was some kind of bug, because the issues started straight after the test studio update.

Hope it will help.

~Adam

0
Accepted
Elena
Telerik team
answered on 27 May 2022, 10:08 AM

Hi guys,

I wanted to post an update on this topic as there is a feasible solution implemented in Test Studio. 

So, this type of error is usually caused by the lack of active desktop session on the execution machine. This is a requirement for the UI functional tests executed in a head-ed mode of the browsers (not mandatory for headless Chrome execution).

You can read some additional details on this topic here and also check the solutions, which Test Studio suggests. The one I recommend is to take advantage of the built-in options to control the user session - ensure to enable the Keep Machine Awake and Reconnect to Console on Disconnect in the Test Runner on the remote machine and then close the RDP window. The session should be reconnected and the tests should be executed as expected. 

You could revisit your setups and try the suggested options from the Execution client.

Regards,
Elena
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Test Studio course! Check it out at https://learn.telerik.com/.
Tags
General Discussions
Asked by
Adam
Top achievements
Rank 1
Answers by
Briar
Top achievements
Rank 1
Adam
Top achievements
Rank 1
Elena
Telerik team
Share this question
or