Remote Connection Object
Description
Enables you to manage UFT One’s connection to a remote Mac computer, and to run the Apple Safari browser on that computer.
This enables UFT One to test Web applications running on Safari. For details on testing Web applications on the Apple Safari browser, see the Web Add-in Quick Reference section of the UFT One Help Center.
Methods and Properties
Connect | Connects UFT One to the specified Mac computer. |
Disconnect | Disconnects UFT One from the remote computer. |
Run | Runs an application on a remote computer. |
IsConnected | Checks whether UFT One is connected to a remote computer. |
Connect Method
Description
Connects UFT One to the specified Mac computer.
Syntax
RemoteConnection.ConnectHostname, [useSSL]
Argument | Type | Description |
---|---|---|
Hostname | String | The name or IP address of the Mac computer. By default, the connection uses port 8822. To use a different port, enter :<port number> after the name or address in this argument. Make sure that the same port number is defined in the UFT One port option in the UFT One Connection Agent preferences on the Mac computer. For details, see the section on How to Install and Configure the UFT One Connection Agent in the UFT One Help. |
useSSL | Boolean | Optional. Specifies whether to connect to the Mac computer using an SSL connection. (Default: false) If you specify true, make sure that:
|
IMPORTANT
UFT One can use this connection only to test Web applications on the Apple Safari Browser.
The connection remains until it is disconnected in one of the following ways:
You call the Disconnect Method in the test or component.
You use the Disconnect button in the Remote Connection dialog box in UFT One.
The When run session ends: Disconnect option in the Record and Run Settings dialog box is selected.
While one connection exists, you cannot create another, except in one case:
If the existing connection did not use SSL, and UFT One initiates an SSL-connection (based on the Record and Run settings), the existing connection is closed, and a new connection is initiated.For details on how UFT One handles connection attempts when a previous connection exists, see the section on Working With Apple Safari on a Remote Mac Computer in the UFT One Help.
The following example connects UFT One to a Mac without SSL, using a non-default port (after making sure to clear any previous connections).
It then opens the Safari browser, logs in to the Newtours site, confirms a flight order, and closes the connection to the Mac.
Example: If RemoteConnection.IsConnected Then
RemoteConnection.Disconnect
End If
RemoteConnection.Connect "33.58.166.132:4567"
RemoteConnection.Run "safari", "https://advantageonlineshopping.com/#/"
Browser("Advantage Shopping").Page("Advantage Shopping").Link("UserMenu").Click
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("username").Set "tutorial"
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("password").SetSecure "5fa0c7324efd369ed5a1cb015311eb47"
Browser("Advantage Shopping").Page("Advantage Shopping").WebButton("sign_in_btnundefined").Click
RemoteConnection.Disconnect
Disconnect Method
Description
Disconnects UFT One from the remote computer.
Syntax
RemoteConnection.Disconnect
IMPORTANT
This refers to a connection initiated by UFT One to a Mac computer, and used to test Web applications running on the Apple Safari browser.
For details on testing Web applications on the Apple Safari browser, see the Web Add-in Quick Reference section of the UFT One Help Center.
The following example connects UFT One to a Mac without SSL, using a non-default port (after making sure to clear any previous connections).
It then opens the Safari browser, logs in to the Newtours site, confirms a flight order, and closes the connection to the Mac.
Example: If RemoteConnection.IsConnected Then
RemoteConnection.Disconnect
End If
RemoteConnection.Connect "33.58.166.132:4567"
RemoteConnection.Run "safari", "https://advantageonlineshopping.com/#/"
Browser("Advantage Shopping").Page("Advantage Shopping").Link("UserMenu").Click
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("username").Set "tutorial"
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("password").SetSecure "5fa0c7324efd369ed5a1cb015311eb47"
Browser("Advantage Shopping").Page("Advantage Shopping").WebButton("sign_in_btnundefined").Click
RemoteConnection.Disconnect
Run Method
Description
Runs an application on a remote computer. Currently, this method can be used only to run the Safari browser on a remote Mac computer.
Syntax
RemoteConnection.RunApplication, Parameters
Argument | Type | Description |
---|---|---|
Application | String | The name of the application to run. Currently only Safari is supported. |
Parameters | String | Optional. The parameters for the application. For Safari,the URL to open in the browser. |
IMPORTANT
This enables UFT One to test Web applications running on Safari.
For details on testing Web applications on the Apple Safari browser, see the Web Add-in Quick Reference section of the UFT One Help Center.
The following example connects UFT One to a Mac without SSL, using a non-default port (after making sure to clear any previous connections).
It then opens the Safari browser, logs in to the Newtours site, confirms a flight order, and closes the connection to the Mac.
Example: If RemoteConnection.IsConnected Then
RemoteConnection.Disconnect
End If
RemoteConnection.Connect "33.58.166.132:4567"
RemoteConnection.Run "safari", "https://advantageonlineshopping.com/#/"
Browser("Advantage Shopping").Page("Advantage Shopping").Link("UserMenu").Click
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("username").Set "tutorial"
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("password").SetSecure "5fa0c7324efd369ed5a1cb015311eb47"
Browser("Advantage Shopping").Page("Advantage Shopping").WebButton("sign_in_btnundefined").Click
RemoteConnection.Disconnect
IsConnected Property
Description
Checks whether UFT One is connected to a remote computer.
Syntax
RemoteConnection.IsConnected
IMPORTANT
This refers to a connection initiated by UFT One to a Mac computer, and used to test Web applications running on the Apple Safari browser.
For details on testing Web applications on the Apple Safari browser, see the Web Add-in Quick Reference section of the UFT One Help Center.
Return Value
Boolean. True
, if connected. Otherwise False
.
The following example connects UFT One to a Mac without SSL, using a non-default port (after making sure to clear any previous connections).
It then opens the Safari browser, logs in to the Newtours site, confirms a flight order, and closes the connection to the Mac.
Example: If RemoteConnection.IsConnected Then
RemoteConnection.Disconnect
End If
RemoteConnection.Connect "33.58.166.132:4567"
RemoteConnection.Run "safari", "https://advantageonlineshopping.com/#/"
Browser("Advantage Shopping").Page("Advantage Shopping").Link("UserMenu").Click
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("username").Set "tutorial"
Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("password").SetSecure "5fa0c7324efd369ed5a1cb015311eb47"
Browser("Advantage Shopping").Page("Advantage Shopping").WebButton("sign_in_btnundefined").Click
RemoteConnection.Disconnect
See also:
- Crypt Object
- DataTable Object
- Description Object
- DeviceReplay Object
- DotNetFactory Object
- DTParameter Object
- DTSheet Object
- Environment Object
- Extern Object
- Parameter Object
- JSON Object
- JsonUtil Object
- MercuryTimers Object (Collection)
- MercuryTimer Object
- NV Object
- OptionalStep Object
- ParallelUtil Object
- LocalParameter Object
- PasswordUtil Object
- PathFinder Object
- PDFUtil Object
- Properties Object (Collection)
- QCUtil Object
- RandomNumber Object
- Recovery Object
- Remote Connection Object
- Reporter Object
- RepositoriesCollection Object
- Repository Object
- Services Object
- Setting Object
- SystemMonitor Object
- TestArgs Object
- TextUtil Object
- UIAutomation Object
- VisualRelation Object
- VisualRelations Object
- VisualRelationsCollection Object
- WebUtil Object
- XMLUtil Object