Question
Mphasis
IN
Last activity: 13 Oct 2017 3:27 EDT
How to trigger the selection of an option in a Select Control - Pega RPA
We have a select control in our web application.
When we manually select an option in this control, the subsequent fields on the page refresh and reload
To automate this, we are using Select Item By Text method and passing the desired value.
When doing, we can see that the desired option is selected, but the associated refreshes in the screen are not happening
Tried the following as well, but nothing seems to work
1) Select Item By Text, with raise event both as true and false
2) Perform click by index
3) Raise the onchange event after selecting the option
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
We were able to select the index by using the Pega Robotics method SelectByText then we raised the change event on the control.
function raiseEvent(htmlId) {
var list = document.getElementById(htmlId);
var eventObject = document.createEvent("Event");
eventObject.initEvent('change', true, false);
target.dispatchEvent(eventObject);
}
To implement this function, we put the code in the ExecuteScript component and called the function from the InvokeScript component from the webpage control.
Pegasystems Inc.
US
Is the control matching correctly? Have you used selectitembyindex?
Mphasis
IN
Yes...the control is matching properly. As I mentioned, when I trigger the Select Option By Text method, I can see that the option is selected in the front end. But the page refresh is not happening
Tried testing selectitembyindex method when in Interrogation mode, but that doesnt seem to have any effect
-
Susvith Narendula
Fifth Third Bank
IN
try to select the option by value. This option is working like a charm for me.
If above option is not working then try below option:
- Set the focus to select control,
- set the text for the select control.
- change the focus from select control to next control.
This will work I guess.
Harish.
Mphasis
IN
Tried the above steps. I am able to place the focus, but the moment I set text select box gets cleared. I try moving the focus to another control, but nothing happens. PFA the screen-shots.
Fifth Third Bank
IN
Hi,
I think the control you are trying to Set the Text is not ComboBox, it is a List Box.
Contact Pega Support team for their assistance.
Thanks,
Mphasis
IN
SR-B76046 has been opened for this
Accepted Solution
Pegasystems Inc.
US
We were able to select the index by using the Pega Robotics method SelectByText then we raised the change event on the control.
function raiseEvent(htmlId) {
var list = document.getElementById(htmlId);
var eventObject = document.createEvent("Event");
eventObject.initEvent('change', true, false);
target.dispatchEvent(eventObject);
}
To implement this function, we put the code in the ExecuteScript component and called the function from the InvokeScript component from the webpage control.
Corporation Service Company
IN
Hi,
I am having the same problem of reloading tablesection after applied the filters.
So as mentioned in the above posts, am trying to use the callScript component. But when I add the component and run the solution am getting an error like 'Object reference not set to an instance of an object'.
Also am not able to see the ccallScript Editor on Script property of the component.
Regards,
Harish
Pegasystems Inc.
US
Hareesh, this is a different problem. I suggest creating a new post around the issue that you are seeing.
BACI
IN
Hi Everyone...I have a issue where i have to trigger Bot from .net webpage. and on Webpage User can enter his criterias and those entered criterias will be treated as input for the Bot. Please suggest.
Pegasystems Inc.
IN
Hi,
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread.
BACI
IN
Hi Vidya, thanks for letting me know about this, I have created new post .https://collaborate.pega.com/question/trigger-bot-net-webpage
Pegasystems Inc.
IN
Hi,
That's was the right thing to do and I see good progress in the conversation as well.
Thanks!