The web page I am testing displays the Login dialog. How can I access this dialog?

Submitted by: Administrator
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.
Submitted by: Administrator

Read Online XQuery Job Interview Questions And Answers