cancel
Showing results for 
Search instead for 
Did you mean: 

How to pick an item from dropdown menu with iRPA?

Hello all,

The dropdown menu that I am trying to manipulate is located in SAP Service Provider Cockpit / Monitoring / Tickets.

I have created a custom query for filtering the tickets. It was saved as a new item in the dropdown menu on the top of the page. When I capture the dropdown menu with iRPA I am able to set the name of the query, but list is long and scrolling is need in order to find my custom query on the bottom of the list.

Is there other way to set the name of the query that I need, or I have to scroll to end and pick the last one(and how to pick it when I dropdown.jpgget more custom queries)?

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Hi Ivaylo,

We need to save one item of the dropdown as a page item and tick the occurs flag so that it recognizes the complete list of dropdown items.

Now we loop this list to click on the required item.

var itemCount=FG.pFieldglassCreateCo.LIcurrency.count(); // LICurrency was the name of the item

for(var j=0;j<itemCount;j++) {

if(FG.pFieldglassCreateCo.LIcurrency.i(j).get()=='YOUR ITEM NAME'){

FG.pFieldglassCreateCo.LIcurrency.i(j).click();

break;

}

}

Srinivas-Rao
Contributor
0 Kudos

Hi - What I know of is : you have to use the method "execscript" of the page entity. Considering it to be a Fiori App, the statement could be like this: -

var stmt = 'sap.ui.getCore().byId("' + <application name>.<page name>.<item name>.scriptItem('id') + '").getSelectedKey();'; 
var sKey = <application name>.<page name>.evalScript(stmt);

stmt = 'function(){sap.ui.getCore().byId("' + <application name>.<page name>.<item name>.scriptItem('id') + '").setSelectedKey("<drop down key value>");}, 0);';
<application name>.<page name>.execScript(stmt);

Thanks & Regards

SR

0 Kudos

It is not Fiori App, so that script is not valid in this case.