This functionality is supported only if you are using the Open Agent.
To test applications in multiple UI sessions on a single machine or to test multiple agents on a single machine, connect to multiple Open Agent instances on the machine. Every agent runs in its own UI-session. A UI session can be a Remote Desktop Protocol (RDP) connection or a Citrix-based connection.
HMACHINE hAgent = Connect("hostname:port")Where
hostname is the name of the machine on which the agent is running, and
port is the unique port that you have specified, which can be either the HTTP or the HTTPS port.
Assume that the server machine that is hosting the UI sessions is named ui-srv. You can create three UI sessions by using the ports 22903/48563, 22904/48564, and 22905/48565.
openAgent.exe -infoServicePort=22903 -infoServiceSecurePort=48563
Do the same for the other two sessions with the respective ports 22904/48564 and 22905/48565.
HMACHINE hAgent1 = Connect("ui-srv:22903") // or 48563 for secure HTTPS communication
HMACHINE hAgent2 = Connect("ui-srv:22904") // or 48564 for secure HTTPS communication
HMACHINE hAgent3 = Connect("ui-srv:22905") // or 48565 for secure HTTPS communication
[-] main()
[ ] HMACHINE hAgent1 = Connect("ui-srv:22903")
[ ] HMACHINE hAgent2 = Connect("ui-srv:22904")
[ ] HMACHINE hAgent3 = Connect("ui-srv:22905")
[ ] hAgent1->FindWindow("//Window").TypeKeys("Hello to session 1!")
[ ] hAgent2->FindWindow("//Window").TypeKeys("Hello to session 2!")
[ ] hAgent3->FindWindow("//Window").TypeKeys("Hello to session 3!")