The Web Page I Am Testing Displays The Login Dialog. How Can I Access This Dialog

The Web Page I Am Testing Displays The Login Dialog. How Can I Access This Dialog


  • 2 Mar, 2012

    When opening some pages, you may see a Login dialog where you should enter the user name and password in order to access the page or the browser may display the Information bar asking for your permission to perform certain actions requested by the page. If you test these type of pages, you need to write code that will: ► Open the page. ► Close the the Login dialog or the Information bar by simulating user actions over them. ► Wait until the page is loaded. Note that the Page.ToUrl method, which is used to open pages, does not return the execution control to the script until the specified page is loaded. In other words, it does not return the execution control until the Login dialog or Information bar is closed. To close the dialog and informative message you should simulate user actions that will close the dialog and the bar. However, you cannot do this since the ToUrl method does not return the control until the dialog and the bar are closed. To work around the problem, you can use any of the following approaches: ► Enter the page?s URL into the Address bar or into the File | Open dialog of your web browser (for example, using the Keys method). ► Use the Navigate or Navigate2 methods of the page object (this is only valid for pages displayed in Internet Explorer or a WebBrowser control). ► Call the Page.ToUrl method using the Runner.CallObjectMethodAsync method.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.