none
Coded ui suddenly stops recognizing and gives errors for already recorded tests RRS feed

  • Question

  • I am new to coded ui but I am familier with this kind of error, tool suddenly stops reconizing and can not find objects on the screen.

    Answers to possible questions

    No, nothing changed on code or on the computer

    No there is no dynamic object issue 

    Same tests were running SUCCESS a few minutes ago

    I also tried create a new project , create a new test and run (In case of maybe something is broken in UImap.Designer.cs, but no,  it doesnt helps still not reconize anymore

    Putting threead.sleep doesn help

    No, starting browser or visual studio doesnt help (VS 2017)

    Please share your opinion and advices on this issue, any help is welcome, thanks.






    • Edited by rastek Thursday, September 12, 2019 7:20 PM
    Friday, December 21, 2018 8:50 AM

Answers

  • Hi rastek,

    Welcome to the MSDN forum.

    It seems that you generate the code by Coded UI Test builder, then you can follow steps below to troubleshot the issue:

    1. Please make sure we use the same zoom setting in the browser for those tests.
    2. Keep the browser on before running the test.
    3. After the first successful test, we should reset the browser to the start page. For example: if we test a web app, we start recording at page A, and end recording at page C. Then after the first successful test the page should be at page C, if we run the test now, the playback will stop because it can’t find required page A element at page C. So make sure we set the start page at the same state as the successful test.
    4. Find the control which can’t be found by error message, check if it’s a composite control like drop-down list. And using the crosshair to validate whether the element can be recognized by CUIT play engine.
    5. Close the Coded UI Test builder, open UIMap.uitest file, delete the extra mouse hover action in the TestMethod.

    And if you use hand-writing way to run the tests, please share the particular code where it throws an exception.

    In addition, I recommend you use IE explorer for your Coded UI Test. It has more support for CUIT.

    If this issue persists, could you please share the complete error message (Message and StackTrace) here, that will help us to reproduce this issue.

    Best regards,

    Sara


    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 24, 2018 7:10 AM
    Moderator

All replies

  • Hi rastek,

    Welcome to the MSDN forum.

    It seems that you generate the code by Coded UI Test builder, then you can follow steps below to troubleshot the issue:

    1. Please make sure we use the same zoom setting in the browser for those tests.
    2. Keep the browser on before running the test.
    3. After the first successful test, we should reset the browser to the start page. For example: if we test a web app, we start recording at page A, and end recording at page C. Then after the first successful test the page should be at page C, if we run the test now, the playback will stop because it can’t find required page A element at page C. So make sure we set the start page at the same state as the successful test.
    4. Find the control which can’t be found by error message, check if it’s a composite control like drop-down list. And using the crosshair to validate whether the element can be recognized by CUIT play engine.
    5. Close the Coded UI Test builder, open UIMap.uitest file, delete the extra mouse hover action in the TestMethod.

    And if you use hand-writing way to run the tests, please share the particular code where it throws an exception.

    In addition, I recommend you use IE explorer for your Coded UI Test. It has more support for CUIT.

    If this issue persists, could you please share the complete error message (Message and StackTrace) here, that will help us to reproduce this issue.

    Best regards,

    Sara


    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 24, 2018 7:10 AM
    Moderator
  • Hi Sara,

    Thanks for suggestions but I do not test browser I test a desktop application and screen resolution or size does not change.

    and problem is not current application, it does not record or replay anything.

    I do not know why everytime is ben thought as browser problem

    as I told anything did not change, its not about some hidden button or something, same code ams evisuaş studio and same pc but suddenly codedui does not work et all


    • Edited by rastek Thursday, September 12, 2019 7:26 PM
    Thursday, September 12, 2019 7:22 PM