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

Generic Dialog Box not handled, Real mouse click not captured

7 Answers 298 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Anju
Top achievements
Rank 1
Anju asked on 30 May 2013, 04:43 AM
Hi,

I am very new to test Studio and hence would like to get clarifications on few issues that I am facing.

Issue 1:
I am using a trial version of telerik RadControls for WPF. Hence when i launch my application, the telerik dialog box opens. I am not able to handle that using the generic handler and my following tests are failing.

Issue 2:

I am recording a real mouse click on RadOutlookBarButton and checking the corresponding controls populated. But while I am playing back, the real mouse click is not happening and the corresponding Radtabcontrol ( which should be visible on mouse click)
is not visible  and hence my tests are failing.

I have attached the Generic Dialog box that pops up herewith. Please let me know what needs to be done to resolve these two issues.

Thanks

7 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 30 May 2013, 09:03 AM
Hello Anju,

Thank you for trying Test Studio.

I filed a bug report on this problem, which you can follow in our Feedback Portal.

I am sorry for any inconvenience it has probably caused and have updated your Telerik Points.

The workaround is to add manually the content presenter and perform a click against it, this will set the focus to the dialog.

To press Enter button use this coded step:

Manager.Desktop.KeyBoard.KeyPress(Keys.Enter, 200, 1);

To press Cancel button:

Manager.Desktop.KeyBoard.KeyPress(Keys.Tab, 200, 1);
Manager.Desktop.KeyBoard.KeyPress(Keys.Enter, 200, 1);

Ensure you Add an Assembly Reference to System.Windows.Forms.

Here is a video demonstration.

Regarding the second issue please:

1. Send us a short video (Jing  is great for this) of the problem to have a better view of the issue. 

2. Send us the execution log.

Hope to hear from you soon.

Regards,
Boyan Boev
Telerik
Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
Reserve your seat today!
0
Anju
Top achievements
Rank 1
answered on 31 May 2013, 05:02 AM

Hi Boyan,

Thank you so much for your quick reply. Both my issues are partially resolved now, though i am not sure how  :(

Issue 1:
I changed initialisation time to 500 and HandleTimeout to 10000 for the 'Handle Generic Dialog' step recorded by Test Studio and it started working. But at times it fails and I will have to delete the step, rerecord it and change the values again to make it back to working condition.I have attached the test steps what I am trying to play back FYR.

I had also tried the method you told me, but I am getting compilation error. To which step should I be adding the manual closing commands? I am not able to edit the code for 'Handle Generic Dialog' step recorded by Test Studio
also i am not using a VS plug in version of Test Studio but a stand alone version. So how do I add reference to this.

I would like to add some info I found reg this issue:
Whenever the dialog box appears before the test studio execution bar, the handler won't work.i.e., If the execution bar comes first, then it will handle the dialog box.

Issue 2: 
The play back which was failing previously was recorded as a 'left click on radOutlookbarbutton' where as it is now recorded as 'select radOutlookbarbutton'.
Could you please let me know the difference between these two and if I wanna recreate the recording as 'select' what should i be doing?

I am facing another issue now :)

Issue 3:

I am recording a mouse click on the first element (cell) of a radgridview, but when i replay the test, it is failing. The code snippet for the failing test step is given as attachment. Please let me what needs to be done.

Please excuse if I am asking very basic questions as I am in the learning phase:)

Thanks & Regards,
Anju








0
Boyan Boev
Telerik team
answered on 31 May 2013, 12:55 PM
Hi Anju,

You don't need to the handle dialog step. Just remove this step and add a brand new coded step as I showed you in the video. Check it out again please.

What I can see in the log is that Test Studio is unable to find the element. There are several reasons for this.

You can start to learn about find expressions and elements here and here.

Hope this helps.

Regards,
Boyan Boev
Telerik
Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
Reserve your seat today!
0
Anju
Top achievements
Rank 1
answered on 02 Jun 2013, 10:14 AM

Oops..sry Boyan , I had missed out the video file in your earlier reply. That is very explanatory. Will try that :) And thanks for the response

Regards,
Anju
0
Boyan Boev
Telerik team
answered on 03 Jun 2013, 02:00 PM
Hello Anju,

Please take your time and update the ticket accordingly.

Looking forward to hearing from you.

 

Regards,
Boyan Boev
Telerik
Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
Reserve your seat today!
0
Pallavi
Top achievements
Rank 1
answered on 04 Jul 2013, 07:28 AM
Hi i am  new to this telerik test studio how to handle failed steps in telerik test studio


Overall Result: Fail
------------------------------------------------------------
'7/4/2013 12:34:44 PM' - Using .Net Runtime version: '4.0.30319.1' for test execution. Build version is '2012.2.1420.0'.
'7/4/2013 12:34:44 PM' - Starting execution....
------------------------------------------------------------
------------------------------------------------------------
'7/4/2013 12:34:48 PM' - Using 'InternetExplorer' version '7.0' as default browser. 
'7/4/2013 12:34:50 PM' - 'Pass' : 1. Navigate to : 'http://116.12.198.165/Astortime3.0/login.aspx'
'7/4/2013 12:34:51 PM' - 'Pass' : 2. Enter text 'admin' in 'LoginCtrlUserNameText'
'7/4/2013 12:34:51 PM' - 'Pass' : 3. Keyboard (KeyPress) - Tab (1 times) on 'LoginCtrlPasswordPassword'
'7/4/2013 12:34:53 PM' - 'Pass' : 4. Enter text 'password' in 'LoginCtrlPasswordPassword'
'7/4/2013 12:34:56 PM' - 'Pass' : 5. Keyboard (KeyPress) - Enter (1 times) on 'LoginCtrlLoginButtonSubmit'
'7/4/2013 12:34:56 PM' - 'Pass' : 6. Click 'ControlPanelSpan'
'7/4/2013 12:34:57 PM' - 'Pass' : 7. Click 'ControlPanelSpan'
'7/4/2013 12:36:07 PM' - 'Fail' : 8. Enter text 'Astoria' in 'ContentPlaceHolder1RgCompanyFilterTextBoxTemplateColumnText'
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Waiting for frame '[Frame:id=Company :: Add / View All_IFrame,name=Company :: Add / View All_IFrame,src=http://116.12.198.165/AstorTime3.0/aspx/EmployeeSetup/AddViewCompany.aspx,UseQuery:False]' timed out. Error: Wait for condition has timed out
InnerException:
System.Exception: Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: Waiting for frame '[Frame:id=Company :: Add / View All_IFrame,name=Company :: Add / View All_IFrame,src=http://116.12.198.165/AstorTime3.0/aspx/EmployeeSetup/AddViewCompany.aspx,UseQuery:False]' timed out. Error: Wait for condition has timed out
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.WaitForAllElements(IAutomationHost host, AutomationDescriptor descriptor, Int32 timeout)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'7/4/2013 12:36:07 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'7/4/2013 12:36:07 PM' - Overall Result: Fail
'7/4/2013 12:36:07 PM' - Duration: [1 min: 18 sec: 515 msec]
------------------------------------------------------------
'7/4/2013 12:36:07 PM' - Test completed!

0
Velin Koychev
Telerik team
answered on 08 Jul 2013, 02:12 PM
Hi Pallavi,

This issue is often due to a dynamic frame Id or Name.

Please double check whether the Name or Src are constants.

If not this is remedied by using the tilde (~) character to indicate a partial match. This can be used in the BaseURL, Id, and Name fields. If the Src string contains a dynamic query, set UseQuery to False. 

Please follow this article in order to get detailed instructions on how overcome this issue.

Hope this helps.
 

Regards,
Velin Koychev
Telerik
Free summer webinars on advanced web automation tactics hosted by Jim Holmes & Adam Goucher.
Reserve your seat today!
Tags
General Discussions
Asked by
Anju
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Anju
Top achievements
Rank 1
Pallavi
Top achievements
Rank 1
Velin Koychev
Telerik team
Share this question
or