Question

2
Replies
72
Views
MichaelD4660 Member since 2017 13 posts
Fifth Third Bank Bank
Posted: 2 years ago
Last activity: 2 years 2 months ago
Closed

"A control has already been created and enqueued"

I am using SetNextKey(key) in a C# component right before the automation clicks a link on a web page, which adds additional form fields. The OpenSpan interrogated controls use clones and key properties. I am using Visual Studio 2015 with Pega plugin v.8.0.1081.

The automation flows successfully during two additions, but during the third round of additions, the above method causes an error:
"A control has already been created and enqueued"

I am a little stumped as to how to troubleshoot this. I have checked the value of the keys during all the additions, and everything seems kosher. Furthermore, it only errors on 1 textbox control out of 4 controls being set, and the call is wrapped like the following.

/* the "key" variable gets passed into the method, as does the parentCtrl */
foreach (WebControl ctrl in parentCtrl.Controls)
{
    if ((ctrl.UseKeys)&&(!ctrl.IsKeyAssigned(key)))
    {
            ctrl.SetNextKey(key);
    }
}

Any insights how to troubleshoot the exact cause of the control already being "created and enqueued" would be greatly appreciated.

Robotic Process Automation
Moderation Team has archived post
Share this page LinkedIn