Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
shivam_gupta07
Discoverer

While automating SAP Fiori applications, one might come across some dynamic UI5 elements such as mentioned in the snapshot below.

shivam_gupta07_37-1711625783238.png

In most cases, recorder may not be able to uniquely identify the elements, thus terminating the automation where it may not find the suitable elements.

In such cases, SAP provides an extremely useful functionality to declare the elements manually using Design Console’s screen and tree feature.

Let us look at the steps required to fulfill the requirement.

  1. Switch to ‘Both’ view.
  2. In the Screen panel, click the target element.
  3. Find the element in the ‘Tree’. (It’s recommended to find element type till the last child DIV)
  4. Hover and right click the element and select ‘Declare Element’.

 

shivam_gupta07_29-1711625019685.png

You might find that element has been uniquely identified or not, but we need to make sure that element must not use ‘id’ as an identifying criterion as it is static criteria, and we need to deal with dynamic elements.

    5. Add the ‘class’ criteria from all the available criteria and remove ‘id’.

shivam_gupta07_30-1711625056762.png    6. Now, we need to add all the parent DIVs until we find the DIV which has a criterion named ‘nth-child-tag            =X’. (Here X can vary on the number of parent DIVs)

 

shivam_gupta07_31-1711625096579.png    7. For this, hover to the immediate parent DIV, right click and select ‘Add to criteria’. Repeat step number 5

shivam_gupta07_32-1711625139948.png

Once you find DIV with ‘nth-child-tag=X’ criteria, you will also find that now your element has been uniquely identified.

Element structure would look something like this.

shivam_gupta07_33-1711625166876.png

   8. Since recorder uses SAPUI5 SDK automatically, make sure you change the element class and select a SAP UI5 recorder.

shivam_gupta07_34-1711625191801.png    9. Make sure to set the target element in automation to current declared element and you’re all set.

shivam_gupta07_36-1711625233166.png

 

 

Hope this blog finds helpful in your automation journey.

Automating Fiori applications becomes much easier as SAP provides various SDKs to interact with Fiori elements and other platform services such as Microsoft.

But there are some important factors which needs to be considered while automating using SPA tool which includes declaring elements uniquely, adding wait functionality as required, defining similar screens uniquely etc.

In this series of blog posts, we are going to deep dive into various other important factors of this RPA tool as well. 

More blogs to follow.

 

 

 

Labels in this area