--%>

How can Login dialog accessed

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

E

Expert

Verified

When opening several pages, you may observe a Login dialog where you must enter the user name and password so as to access the page or the browser may display the Information bar asking for your permission to do certain actions requested through the page. When you test these types of pages, you require writing code that will as:

a. Open the page.

b. Close the Login dialog or Information bar through simulating user actions over them.

c. Wait till the page is loaded. See that the Page.ToUrl method, that is used to open pages, doesn’t return the execution control to the script till the specified page is loadedconversely, it does not return the execution control till the Login dialog or Information bar is closed. For closing the dialog and informative message you must simulate user actions which will close the dialog and the bar. Nonetheless, you cannot do this because the ToUrl method doesn’t return the control till the dialog and the bar are closed. For working around the problem, you can employ any of the following approaches:
• Enter the page’s URL in the Address bar or in the File | Open dialog of your web browser as for illustration, using the Keys method).
• Utilize the Navigate or Navigate2 methods of the page object (it is only valid for pages displayed in a WebBrowser control or Internet Explorer).
• Call the Page.ToUrl method by using the Runner.CallObjectMethodAsync method.

   Related Questions in Programming Languages

  • Q : Define the term Field Define the term

    Define the term Field: Variables stated within a class or interface, exterior of the methods. The fields are members of a class.

  • Q : Function of STR and LPSTR Explain what

     Explain what is the function of STR and LPSTR?

  • Q : C Sharp console application Write a

    Write a simple C# console application to consume the service to generate uniform random numbers.

  • Q : Define Object serialization Object

    Object serialization: The writing of an object's contents in such a manner that its state can be restored, either at a later time, or in a different procedure. This can be employed to store objects between runs of a program, or to transfer or shifts o

  • Q : Define Mixed Mode Mixed Mode : Permits

    Mixed Mode: Permits domain controllers executing both Windows 2000 and prior versions of Windows NT to co-exist in the domain. In mixed mode, the domain features from prior versions of Windows NT Server are still allowed, whereas some Windows 2000 fea

  • Q : ASP.NET Session handling How to set

    How to set Session time out in ASP.NET. I tries changing in config file but still facing issue. Please help..

  • Q : Define Context Normal 0 false false

    Normal 0 false false

  • Q : Explain Abstract Windowing Toolkit

    Abstract Windowing Toolkit: The Abstract Windowing Toolkit (AWT) offers a collection of classes which simplify the creation of applications with the GUI (graphical user interfaces). Such are to be found in the java.awt packages. Included are classes f

  • Q : What is Client Client : It is a user of

    Client: It is a user of a service. The Web client requests resources from Web server, for example: Whenever the client is an object then this is the sender of messages to its object servers.

  • Q : What is an Iterator pattern Iterator

    Iterator pattern: It is a common pattern in which the contents of a collection are iterated above in order. The Iterator pattern frees a client of data from requiring details of how the data is stored. This pattern is maintained by the Iterator and Li