Question
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Tata Consultancy Services
GB
Last activity: 9 Nov 2020 16:25 EST
Pega Robotics - unable to hook the web adapter to a windows adapter
Hi,
I have a requirement to launch my Pega portal from a windows application.I have tried to create a Windows adapter for this and defined the properties as follows :
Path : <given the name of the .exe file>
TargetPath : <given the name of the pega URL it launches>
StartMethod : StartandWait
When I start my interrogation, the windows application runs,displays a modal window which asks me for which Pega region i would like to access, once i choose the region, it determines the corresponding URL, and opens that region in the chosen browser (here IE).
My interrogation ends once i select the region and hit submit. To overcome this, i added the target path as the region i am selecting.
It is opening that application but can't interrogate this Pega portal (which would need a web adapter). How do i establish a connection between the windows and web adapter now?
Environment Details :
Studio v Proprietary information hidden
OS : Windows 10
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 9 Nov 2020 16:24 EST
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-05/e90c12b7-5a50-45b6-9408-8644c06fabca.jpg?h=9bedb0c7&itok=I_lzpbin)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-05/e90c12b7-5a50-45b6-9408-8644c06fabca.jpg?h=9bedb0c7&itok=I_lzpbin)
Pegasystems Inc.
US
In this case, the TargetPath would be iexplore.exe in order to use StartAndWait. It would not be a URL. If IExplore.exe is a child process of your "launcher", then you can use the StartMethod of Start and enable the HookChildProcesses property of the adapter. Using a tool like Process Explorer would help here.
You really shouldn't interrogate the Pega portal though. You should instead work with the application using the APIs provided in the Pega application as this is the preferred method.
-
Richa Gulati
Updated: 5 Nov 2020 9:03 EST
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Tata Consultancy Services
GB
Thanks Thomas, giving the TargetPath as iexplore.exe works alongwith selecting the StartMethod of 'Start'. So if my browser selection on screen changes from IE to Chrome, then how would I implement the same in the TargetPath.
Again, when you mentioned that i should not interrogate the Pega portal, then how do I connect my automation together. My main motive is to automate few checks in the portal, but the portal has to be launched via the windows App in the first place as i mentioned earlier.
Can you please explain this "You should instead work with the application using the APIs provided in the Pega application as this is the preferred method".
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-05/e90c12b7-5a50-45b6-9408-8644c06fabca.jpg?h=9bedb0c7&itok=I_lzpbin)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-05/e90c12b7-5a50-45b6-9408-8644c06fabca.jpg?h=9bedb0c7&itok=I_lzpbin)
Pegasystems Inc.
US
For the Chrome adapter, you can set the StartMethod to MonitorAll and set StartOnProjectStart to true. Chrome is technically MonitorAll normally, but the adapter has to be started first. You can use that along with the AcceptedDomains property to limit that adapter to only hooking into the specific domain only and ignoring any other pages from outside of the AcceptedDomains..
Your Pega SSA or LSA developers who manage the application should be able to assist with the APIs. Creating cases can be done using out-of-the-box APIs rather than trying to automate the UI of the application which may change. At the simplest form, you would call a web service to perform your functions on the Pega application.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Tata Consultancy Services
GB
Thanks Thomas. I got your point regarding APIs now. We are not trying to create any cases using robotics but part of our use case is to use a robot to do some sanity checks like rendering of the UI and opening attachments etc to see all is well.
But the issue is happening when trying to hook to the web adapter. I am able to interrogate the necessary controls now using the above config and when I'm writing the automation, robot is able to choose the variables and launch the portal in a new window in IE(with the relevant URL) but then since its a new thread now, the automation stops there. It is not moving on to the next step where i need to fill in credentials on the corresponding Pega portal.Should the robot be able to continue to the new thread on it own or am i missing something here.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-05/e90c12b7-5a50-45b6-9408-8644c06fabca.jpg?h=9bedb0c7&itok=I_lzpbin)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-05/e90c12b7-5a50-45b6-9408-8644c06fabca.jpg?h=9bedb0c7&itok=I_lzpbin)
Pegasystems Inc.
US
You must be missing something. If you can hook the page, then your automation should continue. Is the window launching as modal to your other application?
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Tata Consultancy Services
GB
From the windows application, a modal window to select the desired region and desired browser from a dropdown is displayed. On selection and submit, this triggers the chosen application in a new browser.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-05/e90c12b7-5a50-45b6-9408-8644c06fabca.jpg?h=9bedb0c7&itok=I_lzpbin)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-05/e90c12b7-5a50-45b6-9408-8644c06fabca.jpg?h=9bedb0c7&itok=I_lzpbin)
Pegasystems Inc.
US
Your click method to show the modal is most likely not going to return until the modal is closed. You can use a Parallel Process to click the link in one thread and then in another handle the modal and do whatever is needed to it before closing it You would then use the bottom link off of the Parallel Process to continue execution.
Updated: 9 Nov 2020 16:27 EST
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Tata Consultancy Services
GB
Hi Thomas, I have checked in Task Manager as well, once the parent windows application launches the Portal, it is closing itself.
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-05/e90c12b7-5a50-45b6-9408-8644c06fabca.jpg?h=9bedb0c7&itok=I_lzpbin)
![](https://accounts.pega.com/sites/default/files/styles/user_image/public/2024-05/e90c12b7-5a50-45b6-9408-8644c06fabca.jpg?h=9bedb0c7&itok=I_lzpbin)
Pegasystems Inc.
US
I cannot tell from what you have here. I would bet you could get this resolved with a support case. I would suggest that you open a support case and get some hands-on assistance. If that is not feasible, you might attach a RuntimeLog and I might be able to see something there.
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Tata Consultancy Services
GB
Thanks for your help Thomas. The control was not getting matched and so the automation wasn't working. Its resolved now.