Forum Discussion

sheetals's avatar
sheetals
Helper I
4 years ago
Solved

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?

3 Replies

  • Anonymous's avatar
    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