Navigation step failed due to logon dialog in IE

4 posts, 1 answers
  1. Jessica
    Jessica avatar
    8 posts
    Member since:
    Aug 2017

    Posted 11 Oct 2017 Link to this post

    Hello, 

    I'm currently using Test Studio Version 2016.3.928.0 to test an ASP.NET Web Application. My test goes to my published application and a logon prompt is immediately prompted when the URL is hit to get the user's username and password. In Chrome, Edge, and Firefox the test runs fine when I do a navigation step and then deal with the logon dialog in the next step. In IE (version: 11.1770.14393.0), however, the test fails at the navigation step with the following information in the log: 

    Overall Result: Fail
    ------------------------------------------------------------
    '10/11/2017 6:43:31 PM' - Executing test: 'Internet Explorer', path: 'Internet Explorer.tstest.'
    '10/11/2017 6:43:31 PM' - Using .Net Runtime version: '4.0.30319.42000' for test execution. Build version is '2016.3.928.0'.
    ------------------------------------------------------------
    ------------------------------------------------------------
    '10/11/2017 6:43:33 PM' - Using 'InternetExplorer' version '11.0' as default browser. 
    '10/11/2017 6:43:34 PM' - LOG: Unexpected dialog encountered. Taking no action.
    '10/11/2017 6:44:34 PM' - 'Fail' : 1. Navigate to : '/'
    ------------------------------------------------------------
    Failure Information: 
    ~~~~~~~~~~~~~~~
    Wait for condition has timed out
    InnerException:
    System.TimeoutException: Wait for condition has timed out
       at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
       at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
       at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
       at ArtOfTest.WebAii.Core.Browser.WaitUntilReady()
       at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
       at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
       at ArtOfTest.WebAii.Core.Browser.InternalNavigateTo(Uri uri, Boolean useDecodedUrl)
       at ArtOfTest.WebAii.Core.Browser.NavigateTo(Uri uri, Boolean useDecodedUrl)
       at ArtOfTest.WebAii.Core.Browser.NavigateTo(String url, Boolean useDecodedUrl)
       at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.NavigateToActionDescriptor.Execute(Browser browser)
       at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
    ------------------------------------------------------------
    '10/11/2017 6:44:34 PM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
    ------------------------------------------------------------
    '10/11/2017 6:44:34 PM' - Overall Result: Fail
    '10/11/2017 6:44:34 PM' - Duration: [1 min: 0 sec: 296 msec]
    ------------------------------------------------------------
    '10/11/2017 6:44:57 PM' - Test completed!

     

    I see that it detected the logon dialog, but it says it's timed out waiting for a condition. I'm not sure what condition it's expecting to meet, since it did go to the proper URL. Nor am I sure how to find a workaround. In the other browsers I just set the BaseURL to my application webpage URL and did the NavigationURL as '/' and the step didn't fail in the other browsers, but it still fails in IE.  I've recalibrated my browser and ran updates on Windows 10 and it hasn't had any impact on this error. 

    Thanks, 

    Jessica

  2. Answer
    Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    938 posts

    Posted 12 Oct 2017 Link to this post

    Hello Jessica,

    Thank you for reaching us out. 

    Please note that this scenario could not be handled out of the box as the page never returns ReadyState until the dialog is handled. Of course you could use a coded step to workaround that. Please find the sample code here and try to adjust it to your scenario. 

    In case you need any further assistance do not hesitate to contact us again! Thanks! 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Jessica
    Jessica avatar
    8 posts
    Member since:
    Aug 2017

    Posted 24 Oct 2017 in reply to Elena Tsvetkova Link to this post

    Hello, 

    One more question. How would you go about using encryption of the password on the code side, since the workaround would be to do a coded step?

    Thanks,

    Jessica

  4. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    938 posts

    Posted 25 Oct 2017 Link to this post

    Hi Jessica,

    Thanks for the feedback. 

    I am glad to know the provided solution works fine for you. 

    I would suggest you use a test user for the automation of the application. That way you could test the functionality and avoid accessing real data. 

    In case this is not an option you could implement your custom encryption in the coded step. I have searched the web and found a possible approach which you could adjust for your scenario. As mentioned this should be custom implementation in C#. 

    I hope this will be helpful for you! 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top