Object Model Reference for GUI Testing > SAP Gui for Windows > AutoLogon Method

SAPGuiUtil Object

Description

A utility object in a SAP GUI for Windows application.

IMPORTANT

Enables you to perform connection operations on your SAP Gui for Windows application during the test run.

Operations

The sections below list the built-in methods and properties that you can use as operations for the SAPGuiUtil object.

Methods

Method AutoLogon Connects and logs on to an SAP server.
Method AutoLogonByIP Connects and logs on to an SAP server according to its IP address.
Method AutoLogonByTargetSystem Connects and logs on to an SAP server according to its target system.
Method CloseConnections Closes any SAP connections that were opened by UFT or by the user.
Method OpenConnection Opens a connection to the specified SAP server.
Method OpenConnectionByIP Opens a connection to the specified SAP server according to its IP address.
Method OpenConnectionByTargetSystem Opens a connection to the specified SAP server according to its target system.
Method StartBPCATracing Begins running the Business Process Change Analyzer to detect changes in a transaction's objects (as compared to the TBOM).
Method StopBPCATracing Stops running the Business Process Change Analyzer.

Back to top

 

AutoLogon Method

Description

Connects and logs on to an SAP server.

Syntax

object.AutoLogon ServerDescription, Client, User, Password, Language

Arguments

Parameter Description
ServerDescription Required. A String value.
The server to which you want to log on. The string is case-sensitive and must be identical to the one displayed in the SAP Logon dialog box.
Client Required. A String value.
The SAP client you want to use.
User Required. A String value.
The username with which you want to log on to the SAP Server.
Password Required. A String value.
The encrypted value of the password for the specified username.
To find the encrypted value, use the Password Encoder utility (Start > All Programs > HPE Software > Unified Functional Testing > Tools > Password Encoder) or use the Data Table encryption option (right-click the unencrypted value in the cell and choose Data > Encrypt). For more information, see the Unified Functional Testing User Guide.
Language Required. A String value.
The 2-letter code for the language you want to use.

Return Type

None

IMPORTANT

The AutoLogon method opens a new connection even if an open session already exists.

Tip: You can also use the SAP tab of the Record and Run Settings dialog box to instruct UFT to connect and log on to a specific server and client at the beginning of each record and run session.

Example

Back to top

 

AutoLogonByIP Method

Description

Connects and logs on to an SAP server according to its IP address.

Syntax

object.AutoLogonByIP ConnectionString, Client, User, Password, Language, [SystemNumber], [RoutingServers]

Arguments

Parameter Description
ConnectionString Required. A String value.
The connection string for the SAP server to which you want to log on.
Client Required. A String value.
The SAP client you want to use.
User Required. A String value.
The username with which you want to log on.
Password Required. A String value.
The encrypted value of the password for the specified username.
To find the encrypted value, use the Password Encoder utility (Start > All Programs > HPE Software > Unified Functional Testing > Tools > Password Encoder) or use the Data Table encryption option (right-click the unencrypted value in the cell and choose Data > Encrypt). For more information, see the Unified Functional Testing User Guide.
Language Required. A String value.
The 2-letter code for the language you want to use.
SystemNumber Optional. A long integer value.
The server system number.
Default value = 0
RoutingServers Optional. A String value.
The servers that are required in order to reach the server with which you want to connect.
Default value = ""

Return Type

None

Example

Back to top

 

AutoLogonByTargetSystem Method

Description

Connects and logs on to an SAP server according to its target system.

Syntax

object.AutoLogonByTargetSystem TargetSystem, Client, User, Password, Language

Arguments

Parameter Description
TargetSystem Required. A String value.
The SAP environment that you want to test.
Client Required. A String value.
The SAP client you want to use.
User Required. A String value.
The username with which you want to log on.
Password Required. A String value.
The encrypted value of the password for the specified username.
To find the encrypted value, use the Password Encoder utility (Start > All Programs > HPE Software > Unified Functional Testing > Tools > Password Encoder) or use the Data Table encryption option (right-click the unencrypted value in the cell and choose Data > Encrypt). For more information, see the Unified Functional Testing User Guide.
Language Required. A String value.
The 2-letter code for the language you want to use.

Return Type

None

Example

Back to top

 

CloseConnections Method

Description

Closes any SAP connections that were opened by UFT or by the user.

Syntax

object.CloseConnections

Return Type

None

IMPORTANT

All open SAP connections are closed, both those opened by UFT, and those opened by the user.

The exception to this is if the Do not record and run on settings that are already open check box is selected in the SAP tab of the Record and Run Settings dialog box. In this case, any sessions that were opened prior to the current session are not closed.

Example

Back to top

 

OpenConnection Method

Description

Opens a connection to the specified SAP server.

Syntax

object.OpenConnection ServerDescription

Arguments

Parameter Description
ServerDescription Required. A String value.
The server to which you want to open a connection. The string is case-sensitive and must be identical to the one displayed in the SAP Logon dialog box.

Return Type

None

Example

Back to top

 

OpenConnectionByIP Method

Description

Opens a connection to the specified SAP server according to its IP address.

Syntax

object.OpenConnectionByIP ConnectionString, [SystemNumber], [RoutingServers]

Arguments

Parameter Description
ConnectionString Required. A String value.
The connection string for the SAP server to which you want to open a connection.
SystemNumber Optional. A long integer value.
The server system number.
Default value = 0
RoutingServers Optional. A String value.
The servers that are required in order to reach the server with which you want to connect.
Default value = ""

Return Type

None

Example

Back to top

 

OpenConnectionByTargetSystem Method

Description

Opens a connection to the specified SAP server according to its target system.

Syntax

object.OpenConnectionByTargetSystem TargetSystem

Arguments

Parameter Description
TargetSystem Required. A String value.
The SAP environment that you want to test.

Return Type

None

Example

Back to top

 

StartBPCATracing Method

Description

Begins running the Business Process Change Analyzer to detect changes in a transaction's objects (as compared to the TBOM).

Syntax

object.StartBPCATracing

Return Type

None

Example

Back to top

 

StopBPCATracing Method

Description

Stops running the Business Process Change Analyzer.

Syntax

object.StopBPCATracing

Return Type

None

Example

Back to top

See also: