SAP: Selector could not be found

Hi, I’m automating SAP 740. I realized in the first debug, the selector is found, but after several times debugging, the below error is displayed:
Scrape ‘Attachment List’ Table: Could not find the UI element corresponding to this selector:

This only happens for non-main window (see below)

This is the workflow:

This is the configuration:

I try to use workaround such as export to xlsx, but the UI element could not be found. The scripting is also available on the client and server side. Any idea why does it behave like that?

I just realized that both pop-up windows have similar selector in attach windows.

For this one, I could not highlight it.

But for this one, I could highlight it.

Is there a way to make them unique?

@azeem_rosli whats the SAP transaction code? and can you upload the .xaml here?


DownloadAttachments.xaml (52.6 KB)

If I edit idx=‘1’, I’ll get the small window, while idx=‘2’ is the big one. But I don’t think it’s a best practice.

1 Like

must you open both windows at the same time?
if you always open them in the same order i think its fine to keep idx=‘2’

Both windows are opened. I did a workaround on the idx, now it’s working, but I afraid it will cause high frequency of system exceptions. Is there any other possible way to set an anchor or something similar?

I still encounter errors as every time a continue button is clicked, the window close. It then opens again to process another attachment. Therefore, the selector is not stable. Need help to make them unique without idx.

you can try using anchor then

in ui explorer select the table, then click indicate anchor and selector the annchor
then replace your old selector with this new selector+anchor

Thanks @jack.chan, but the selector is for attach window, I’ve tried & it’s not working

what if you tick this property? (and sthen it should select the window in front
et idx=‘*’)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.