--%>

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 : Explain Return statement Return

    Return statement: It is a statement employed to terminate the execution of the method. The method with void return type might only have return statements of the form as: return;

  • Q : Overriding a base class method in

    Explain the way to overriding a base class method in Visual Studio .NET and in Visual Studio 2005.

  • Q : Explain Package declaration Package

    Package declaration: It is a declaration employed to name a package. This should be the first item in the source file, preceding any import statements. For example,     pa

  • Q : Explain Object reference Object

    Object reference: It is a reference to an object. Languages other than Java employ terms like pointer or address or. It is significant to keep the difference clear between an object and its reference. The variable like argo

    Q : What is an IP address IP address : An

    IP address: An Internet Protocol (abbreviated as IP) address for a networked computer. Presently, IP addresses comprises of 4-byte values, written in dotted decimal notation, like 129.12.0.1. In future, IP addresses will be 16-bytes long to accommodat

  • Q : What is Signal Handler Signal Handlers:

    Signal Handlers: In some operating systems, signal handlers are executed on a thread stack; they “overlay” the current thread execution (which may be used, for example, in combination with setjmp/longjmp to create user-domain lightweight t

  • Q : Explain Swing Swing : The Swing classes

    Swing: The Swing classes are portion of a wider collection termed as the Java Foundation Classes (abbreviated as JFC). The swing classes are stated in the javax.swing packages. They give a further set of components which extend the capabilities of Abs

  • Q : Database management information system

    How much would it cost to create a simple database management information system by utilizing MySQL and PHP?The proposal of the system should include the following: Background narrative of setting and background of problem m

  • Q : C Sharp console application Write a

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

  • Q : Illustrates the parts of an XML

    Illustrates the parts of an XML document are case-sensitive.