Generic Dialog Box not handled, Real mouse click not captured

8 posts, 0 answers
  1. Anju
    Anju avatar
    14 posts
    Member since:
    May 2013

    Posted 29 May 2013 Link to this post

    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
  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 30 May 2013 Link to this post

    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!
  3. Anju
    Anju avatar
    14 posts
    Member since:
    May 2013

    Posted 31 May 2013 Link to this post


    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








  4. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 31 May 2013 Link to this post

    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!
  5. Anju
    Anju avatar
    14 posts
    Member since:
    May 2013

    Posted 02 Jun 2013 Link to this post


    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
  6. Boyan Boev
    Admin
    Boyan Boev avatar
    1072 posts

    Posted 03 Jun 2013 Link to this post

    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!
  7. Pallavi
    Pallavi avatar
    1 posts
    Member since:
    Jul 2013

    Posted 04 Jul 2013 Link to this post

    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!

  8. Velin Koychev
    Admin
    Velin Koychev avatar
    88 posts

    Posted 08 Jul 2013 Link to this post

    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!
Back to Top