Forum Discussion
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?
- Anonymous4 years ago
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
3 Replies
- AnonymousNot 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
- sheetalsHelper I
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.
The ultimate end goal is to automate the data source connection process from Getdata selection in powerbi MainWindow by providing source details as input.
Anonymous Is it not possible to do these automation process without webpage initialization?
- AnonymousNot 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