UserName Property (Login Object)

Applies to TestComplete 15.63, last modified on April 10, 2024


Gets or sets the user name entered in the browser login dialog.



Read-Write Property String
TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section

Applies To

The property is applied to the following object:

View Mode

This property is available in the Object Browser panel and in other panels and dialogs in both Basic and Advanced view modes.

Property Value

A string containing the user name entered in the login dialog.


To enter the user name in the browser login dialog, you can use either the Login.UserName property or the SetText method of the user name input field:

page.Login.UserName = "jsmith"


The difference is that the SetText method posts a message to the test log about text input whereas setting the Login.UserName property value does not post any messages to the test log.


For an example of using the Login.UserName property, see the Login object description.

See Also

Login Object
Password Property (Login Object)
Testing Web Applications
Handle JavaScript Popups and Browser Dialogs

Highlight search results