Password Property (Login Object)

Applies to TestComplete 15.46, last modified on January 09, 2023

Description

Sets the password in the browser login dialog.

Declaration

TestObj.Password

Write-Only 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

The password to enter in the login dialog.

The Password property is write-only, meaning it can only be set but not read. The property value is not displayed in the Object Browser, and an attempt to read the property value from tests will result in an error.

Remarks

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

page.Login.Password = "passphrase"

page.Login.Textbox("Password").SetText("passphrase")

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

Example

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

See Also

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

Highlight search results