none
Coded Ui Testing Not running in Visual studio 2015 RRS feed

  • Question

  • We have a Coded-Ui-Testing application which will run in visual studio 2015. Recently I have formatted the system and then re-installed the Visual studio 2015. Now the same tests cannot able to run successfully. It is entering the data in the login screen and then it moves to the home page to select the drop down value in the Telerik controls. Thus the smoke tests are stopped at this stage. Below is the error message.

    The same code is running in some other systems with visual studio 2015.  Both the system have installed with visual studio enterprise 2015  with update 3. Both have CodedUI component.

    Did anyone know the missing settings ( if any ) in this case ?

    Any help regarding this are warmly welcome.

    Thanks 

    Radhakrishnan

    Thursday, December 5, 2019 3:14 PM

All replies

  • Hi Radhakrishnan,

    Welcome to MSDN forum.

    Did you change your display or maybe modify some settings? As far as I know, if the display has been changed, CUIT might could not find the control via the location.

    Not sure if you have set some properties for CUIT to find the control, like AutomationId, Name and HelpText, and if there is another control has the same property, CUIT will fail to run. (But you said you could run in other system successfully so I think this issue is more related to VS itself)

    Maybe you could try below steps to troubleshoot and exclude if this issue is caused by Visual Studio.

    (1) Please try to reboot your machine and restart VS 2015 see if this issue persists.

    (2) Please try to repair Visual Studio from Control Panel -> Program -> Programs and Features -> right-click Microsoft Visual Studio Enterprise 2015 with Updates -> Change -> Repair.

    (3) Rebuild your solution and test again.

    BTW, if there are some dynamic values that needed in the process and will affect the search properties or display, CUIT might also could not find the control.

    Hope all above could help you.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 6, 2019 6:59 AM
  • Hi Tianyu,

    I have reboot the system, Repaired visual studio from control panel, rebuild the solution and tested.

    Also there is not dynamic values needed for the process. The test data is maintained in XML file. No Other values are needed for the process.

    The same error occurs.

    The test has started and enters in login screen. Enters the login details, Hit the login button. Till now the coded ui  test is working. Then in the home page it is supposed the select the value in Telerik drop down control. Here it takes a long time to do and throws the error.

    Any other thing that I am missing.

    Thanks,

    Radhakrishnan

    Friday, December 6, 2019 11:01 AM
  • Hi Radhakrishnan,

    Thank you for your feedback.

    In general, it will work without setting any other things. If possible, I suggest you could try to add a new simple CUIT project, and record the process till finish selecting the value in Telerik drop down control. Afterwards, run it to see if this test could run well.

    If it could run well without any error, I consider if there is something wrong with your previous test project maybe missing some added components or extensions. Besides, maybe something has changed by accident and let the CUIT could not find the control.

    If it stops at the same stage, maybe you could check if there is any third-party plugins/extensions or applications that affect it.

    In addition, Not sure if the control isn’t loaded in the window when perform action on the control. According to this thread CUIT can’t find control for action just recorded, you could try to add this code line before the steps which fail to playback.

    Control.WaitForControlReady();

    BTW, you could also try to delete the hidden .vs folder in your solution folder and test again.

    Hope this could help you.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.



    Monday, December 9, 2019 7:00 AM
  • Hi Radhakrishnan,

    Sorry to bothering you.

    According to your description, not sure the search time is too short to find this control, you could try one of below suggestions:

    #1, set the think time after moving to the page, the unit is milliseconds

    playback.wait(30000)

    #2, set search timeout, the default value is two minutes.

    Playback.PlaybackSettings.SearchTimeout = 180000

    Any feedback will be expected.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Monday, December 9, 2019 7:17 AM