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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
Anonymous
Not applicable

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

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

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

@Anonymous  Is it not possible to do these automation process without webpage initialization?

 

Anonymous
Not applicable

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

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.