Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in RPA by (12.7k points)

I am following a video SAP Automation with UiPath to automate logging in through an SAP client as a user with valid credentials.

Environment Details:

SAP Client: IDES ECC 6.0 incl. EhP7

Host machine: Intel Core i3 CPU with 64 bit - Windows 8 system.

Following the video I have an Attach Window activity which contains two activities as follows:

A Click Text of ClickType as CLICK_SINGLE

A Click Text of ClickType as CLICK_DOUBLE

The elements as identified by Selector Editor or UI Explorer are as follows:

<wnd ctrlid='76836616' />

<wnd ctrlid='100' title='SAP&apos;s Advanced Treelist' />

and

<wnd ctrlid='76836616' />

<wnd ctrlid='5002' title='myContainer' />

<wnd ctrlid='1008' />

<ctrl name='SAP_IDES' role='list item' />

As you can observe the ctrlid is same for both the elements but somehow it is dynamic. However, the first couple of executions are perfecto.

The issue starts when trying to execute the workflow after a considerable amount of time has elapsed. I was facing an error as:

Error {"message":"Click Text 'SAPTreeList': Cannot find the UI element corresponding to this selector: <wnd ctrlid='90279688' /><wnd ctrlid='100' title='SAP&apos;s Advanced Treelist' />","level":"Error","logType":"Default","timeStamp":"2019-02-06T13:16:44.295729+05:30","fingerprint":"bec67d2a-14d1-4b93-ac06-03156aea69fe","windowsIdentity":"AtechM-03\\AtechM_03","machineName":"ATECHM-03","processName":"LearningUiPath","processVersion":"1.0.0.0","jobId":"e7f88d9e-e485-4eee-8a54-7450771238f3","robotName":"ATECHM_03","machineId":0,"fileName":"Main"}

So it was clear from the error message that the selector wasn't a valid selector.

  • Using Selector Editor and UI Explorer I found the ctrlid changes from '76836616' to '79865432'. So I tried to use the partial selector. It is observed that UiPath randomly:

Error {"message":"Click Text 'SAPTreeList': Cannot find the UI element corresponding to this selector: <wnd omit:ctrlid='76836616' /><wnd ctrlid='100' title='SAP&apos;s Advanced Treelist' />","level":"Error","logType":"Default","timeStamp":"2019-02-27T11:59:39.2811258+05:30","fingerprint":"752fe27b-16f4-4e7b-95c0-f1e8a6b49e7b","windowsIdentity":"AtechM-03\\AtechM_03","machineName":"ATECHM-03","processName":"LearningUiPath","processVersion":"1.0.0.0","jobId":"b6ba7310-749c-4c28-a9d3-d1db0c6c7dec","robotName":"ATECHM_03","machineId":0,"fileName":"SAP_UserList_BOT"}

  • Identifies the element with wildcards in partial selector as <wnd ctrlid='7*' />. This works for 4-5 rounds of execution. But then '76836616' also changes to '88068312' where the execution fails.

So my question is how do I accommodate the dynamic ctrlid which changes time to time and is a mandatory selector for UiPath?

1 Answer

0 votes
by (29.5k points)
When there is no reliable selector then you can try using anchor-based activity. It is a container for an anchor and an action activity that tries to locate your UI element by using other UI elements as anchors. You can you use both find element and find image activities as anchors.
Remember that anchor base activity does not work in the background.

Browse Categories

...