Forum Discussion

nisgupta's avatar
nisgupta
Valued Contributor
4 years ago
Solved

Unexpected window cause the test to fail

We do have issue that occur sometime. Here is the attached screenshot.

 

- When entering the user name and password in authentication dialog , the same authentication dialog window appear again and our test fail due to Unexpected window - authentication required. 

 

Any idea how this can be fixed . If I check "Ignore Unexpected Window" will this resolve the issue 

 

-Nishchal

8 Replies

  • Wamboo's avatar
    Wamboo
    Community Hero

    Write a method that will routinely look for the indicated object when the first window is approved.

     

    Search for this object dynamically using the object search function.

     

    If you are using Aliases (and you should), you can refresh the .refreshMappingInfo() structure and look for this item again in the structure.

     

    This is of course a fix, in my opinion, only allowing the automatic tests to work properly. Ultimately such bug should be fixed by the appropriate development team.

     

    example:

     

    var testObj = Aliases.process.obj.nestedObj;
    
    TestObj.RefreshMappingInfo();
    
    var findObj = testObj .FindAllChildren("Name", "objName or ID"); // or any other Find method