Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sheetals
Helper I
Helper I

Access Power BI desktop element obtained from RPA to perform required automation

I am using rpaframework library(RPA.Desktop.Windows) in python to perform Power BI automation .

I have obtained Power BI window elements using this library as shown below:

 

([<uia_controls.StaticWrapper - 'Get data', Static, 8881667776078132027>,<uia_controls.ButtonWrapper - 'Close', Button, -4781744411977329195>], [{'automation_id': '', 'class_name': '', 'control_id': 'None', 'control_type': 'Text', 'enabled': 'True', 'handle': 'None', 'name': 'Get data', 'parent': 'Button', 'process_id': '10844', 'rectangle': '(L195, T241, R255, B261)', 'rich_text': 'Get data', 'runtime_id': '(42, 133602, 4, 842, 61453, 1)', 'visible': 'True', 'legacy': {'ChildId': 1, 'DefaultAction': '', 'Description': '', 'Help': '', 'KeyboardShortcut': '', 'Name': 'Get data', 'Role': 42, 'State': 64, 'Value': ''}, 'object': <uia_controls.StaticWrapper - 'Get data', Static, 8881667776078132027>}, {'automation_id': '', 'class_name': '', 'control_id': 'None', 'control_type': 'Button', 'enabled': 'True', 'handle': 'None', 'name': 'Close', 'parent': 'Pane', 'process_id': '10844', 'rectangle': '(L1200, T73, R1232, B99)', 'rich_text': 'Close', 'runtime_id': '(42, 133602, 4, 855)', 'visible': 'True', 'legacy': {'ChildId': 0, 'DefaultAction': 'Toggle', 'Description': '', 'Help': '', 'KeyboardShortcut': '', 'Name': 'Close', 'Role': 43, 'State': 1048576, 'Value': ''}, 'object': <uia_controls.ButtonWrapper - 'Close', Button, -4781744411977329195>}])

 

In above structure I have a close button element , How can I access that element to perform close operation event(mouse_click event on close button) on Power BI window by automation?

1 ACCEPTED SOLUTION

HI @sheetals,

For the close dialog part, I think it should be more related to hard/software simulation which is not suitable to process by power bi automation.

What can I do with the Power BI API - Power BI | Microsoft Docs

For this ultimate goal, I think you can create a teams app with parameterized query parameters with different data connectors with conditions to achieve use parameters to generate different types of datasources.

Change the Source of Power BI Datasets Dynamically Using Power Query Parameters - RADACAD

Change the Data Source TYPE of the Power BI Dynamically using Power Query Parameters - RADACAD

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @sheetals,

According to your description, I think power bi automation is not suitable for these operations.
For the click event, it should require the web page initialization then you can invoke corresponding elements.
In my opinion, I'd like to suggest you manually trace the HTTP requests when you click on the button sent.
Then you can use power bi automate to send requests with all requirement keys/tokens and corresponding contents to that URL to simulation these 'click button' operations.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

To add more understanding of my question have attached a screenshot below of close icon (highlighted in img) that I want to access in powerbi to automate close process of that dialog.

pbi.PNG

 

The ultimate end goal is to automate the data source connection  process from Getdata  selection in powerbi MainWindow by providing source details as input.

pbi_getdata.PNG

@v-shex-msft  Is it not possible to do these automation process without webpage initialization?

 

HI @sheetals,

For the close dialog part, I think it should be more related to hard/software simulation which is not suitable to process by power bi automation.

What can I do with the Power BI API - Power BI | Microsoft Docs

For this ultimate goal, I think you can create a teams app with parameterized query parameters with different data connectors with conditions to achieve use parameters to generate different types of datasources.

Change the Source of Power BI Datasets Dynamically Using Power Query Parameters - RADACAD

Change the Data Source TYPE of the Power BI Dynamically using Power Query Parameters - RADACAD

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Kudoed Authors