cancel
Showing results for 
Search instead for 
Did you mean: 
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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors