Skip to Content
Technical Articles
Author's profile photo Nandkishor Shinde

Automate Fiori Group creation and modification using RPA – UI Vision

Recently I came across a scenario where a Fiori Admin wanted to create large number of Groups and assign the tiles to them from different Catalogs. As per my quick google search, I could not find any direct way to automate this task.

So here is my effort to achieve the above task by using RPA tool (just a Chrome extension).

Initially I tried with chrome extension Selenium IDE, but it does not provide read from file option. So I had to try with ui vision which is its advanced version and also allows read from csv file option.

 

Before using this RPA Tool

 

Before using any third-party tool, ensure to consider the Security recommendations setup in your organization.

The Browser automation tool makes use of html tags and their attributes. In most of the cases, the attributes have dynamic values which can result in failing the script or clicking the wrong button. Hence, always verify it with a test data and make sure you use the correct selector elements and their attributes.

 

Setup

 

  • Add extension UI Vision RPA for your Chrome Browser.
  • Open the extension and create a new folder called Fiori Automation.
  • Create two macros in this folder – “Create Fiori Group” & “Modify Fiori Group”

 

Record Macro “Create Fiori Group”

 

Login to the LaunchPad Designer (tab Groups) before recording Macro. This is to avoid recording the Login action.

Now select the Macro and click Record. This will open the browser tab where you have opened the LaunchPad Designer.

Carry out the tasks to create a group. All the steps will be recorded in the macro.

The sample steps below –

 

Create csv file and upload

 

To create multiple groups, prepare an input file with two columns – Group Name and Group ID.

Upload this file to UI Vision tool (in the tab CSV).

Insert a new command csvRead at the start.

Replace a Group Name and Group ID with variables pointing to csv columns.

 

Run Macro

 

Once the script is ready, you can run it with option Play Macro which will run for a single iteration.

Verify if everything is correctly working. You may adjust the speed in Settings (Command Interval) to slow down the execution, so that you can verify if it is correctly selecting the elements. You can also stop the execution for any issues that you may observe.

If everything is working fine, run it with an option Play Loop and give the counter as per the number of records.

 

Macro for “Modify Fiori Group”

 

Follow the same steps that was done for creation of Groups.

Since group modification steps are not as simple as Group creation, I had to modify few selectors to correctly locate the buttons/tiles.

For example, to select the tile with the text, I used xpath=//*[text()=”${!COL3}”] where the COL3 is 3rd column in the csv file that has name of the tile.

The csv file was added with columns – Group ID, Catalog ID (from table /UI2/PB_C_PAGEMT) and Tile Name.

 

  • I used the group ID to launch the url to navigate to correct group.
  • The Catalog ID was helpful for searching catalog in the popup section.
  • The text of tile was needed to select the appropriate tile in the displayed catalog content.

Test the macro with single iteration and if everything is working fine, play loop to run through all the records in the imported csv file.

Conclusion

 

Browser automation is very helpful considering that many tasks in Fiori Administration are performed via browser. The automation tools such as above can be used to get rid of repetitive manual processes. Record and play the script with correct selector/attributes and it will save lot of your efforts.

 

 

Assigned Tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Ameya Raut
      Ameya Raut

      Hey great blog. Thank you for sharing this.

      I have created Group modification script and you are very right it was tricky to find the exact tile that we want to add. What worked for me is this statement. Hope it helps other too.

      Statement: //span[contains(text(),"${!COL3}")]  where the COL3 is 3rd column in the csv file that has name of the tile.

      The part I am struggling with is to make this script have some feedback where for each row we can give success / error message. Any suggestions on that front?