How to write 1 single automation to take User input from Windows form?
I need to show a windows form for user to enter the data, wait for them to click submit button and return the data they entered. Is it possible to use one single automation to accomplish this function?
I wrote one automation has wait for event of the submit button click and exit out when this event got fired. Please see attached for reference. The problem is when it goes to the step WaitForEvent user cannot interact with the form(enter data. click submit button...)?
Do I have to separate this into two automation, first one to show the windows form and second starts with listening to the submit click event(no execute point) ?
***Edited by Moderator Marissa to update categories***
WaitForEvent is not the right method in this case. One reason is that you don't know how long your user is going to take to fill out the form. If the user doesn't click the Submit button before the timeout expires, it will go down the timeout execution path. Here is a document on how to use WaitForEvent(),
Hi Mitchell, I understand what you are saying. In this case it is for testing purpose so timeout is not going to be an issue. My question is it used to work before for other version of Pega. I have also created a ticket SR-C9262which has all details. Could you please explain me is there any other reason instead of timeout issue? I'm having a forloop and each loop I'm trying to call one automation to show the Windows Form and take user input.
Alejandro is assisting you on your SR. He is correct and I'll let him investigate with you further if you continue to have issue but I will post here what he said:
With testing your solution in both Robotics 8.0.1071 and 8.0.1076, the application seems to run mostly the same, however the issue seems to be with the WaitForEvent method. The WaitForEvent in this solution does not seem to have a setup port connection to the trigger for the event (button perform click). If there is no setup, it will not reach the Fired output and therefore not continue the automation flow.
If you are trying to simply trigger the dialog box when the button is pressed, you need to attach a button.click event and connect it to the textbox block.
use limit as integer variable and update limit on every timeout to higher value. let say limit = 100 initially then whenever timitout occurs update it to 200. break loop when fired of wait for event occurs.)