Question
Pegasystems Inc.
JP
Last activity: 9 Feb 2017 21:26 EST
OpenSpan 7.1 Automation execution blocked by File upload modal dialog on web page
I wanted to automate file upload operation on a web page and followed advice here
https://community.pega.com/sites/default/files/Step1.jpg
https://community.pega.com/sites/default/files/Step2_0.jpg
I have tried out a couple of events as the trigger of automation and found only the "Loaded" event of the web page that contains the "<input type=file>" control works as expected.
The other events like "Started" event of the adpter, "Created" event of browse button, "Click" event of widnows form button, are all blocked at the point of file selection modal dialog displays and the automation steps follows the label "select File" never gets executed. (See attached screenshot for more details)
Can anyone explain the reason for this odd behavior?
Chunzhi
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
To wait for an event, drag the event from the Object Explorer. So, to wait for the created event drag the Created event to the pallet. Now right click on the Created event and you will be able to choose to Wait for this event.
The difference between a WaitForCreate and WaitForEvent Created is subtle but important. A WaitForEvent has a link called Setup. On the yellow line from Setup you perform the steps that are needed to cause the event you are waiting on.
A WaitForCreate will fire True if the control is created before the WaitForCreate is encountered or within the timeout period. The WaitForEvent actually waits for a new instance of the event caused by the Setup code. It will not fire if the control is already created but will wait until a new control is created.
Accenture
IN
Hi,
You have to use wait for event.
1. Take wait for create of model dialog , Right click on it u can find "wait for this event" option.
2.This wait for event will have three output connection. Top first connection should connected with Browse button perform click.
Middle connection is continues flow.
Last is timeout.
Another Way
Automation flow should end with Browse Perform Click
File Dialog created event would be seperate flow.
Pegasystems Inc.
JP
Hi Sivaraj,
Could you put a screenshot for how to use "wait for this event" ?
Is "wait for this event" a method ?
I can not find it from the list of properties/events/methods of the File dialog control.
I can see "WaitForCreate" method, however, there is no options available if you right click on the method shape.
Chunzhi
Accepted Solution
Pegasystems Inc.
US
To wait for an event, drag the event from the Object Explorer. So, to wait for the created event drag the Created event to the pallet. Now right click on the Created event and you will be able to choose to Wait for this event.
The difference between a WaitForCreate and WaitForEvent Created is subtle but important. A WaitForEvent has a link called Setup. On the yellow line from Setup you perform the steps that are needed to cause the event you are waiting on.
A WaitForCreate will fire True if the control is created before the WaitForCreate is encountered or within the timeout period. The WaitForEvent actually waits for a new instance of the event caused by the Setup code. It will not fire if the control is already created but will wait until a new control is created.
Pegasystems Inc.
JP
Hi Jeff,
"WaitForEvent" shape makes the automation working as expected for both "Click" event of the windows form button and "Started" event of the Adapter !!
Chunzhi
Pegasystems Inc.
JP
Still need someone to clarify why automation gets blocked except the automation is triggered by "Loaded" event.
Chunzhi
Pegasystems Inc.
US
Chunzhi,
There is a problem with this particular page. When you interrogate it, the next time the page is shown the controls are not matched. Is this your actual page or just a sample that you are using? I am looking into what can be done to resolve this issue.
Jeff
Pegasystems Inc.
JP
Hi Jeff,
Yes, I had the same problem with the HTML.
I removed "form action match rule" of the html form control and it worked for me.
Pegasystems Inc.
US
Here is my solution. I needed to adjust the adapter a little but if your is working it should be fine. The automation is started here by a button click on a form, but if you want to trigger it on page created use the Created event for webPage1. Here is the automation:
Here is my adjusted adapter:
Pegasystems Inc.
JP
Hi Jeff,
I now understand the difference between using the method "WaitForCreate" and using "Wait for this event" on the event "Created"; however I implemented my solution before reading this article without being aware of these options and just used the event "Created" without selecting "Wait for this event" - it appears to work.
Can I assume using the event "Created" (without "Wait for this event") as the starting point in an animation is functionally the same as using the method "WaitForCreate"? Is there a difference and if so what?
Thanks, Michael