robocorp / rpaframework

Collection of open-source libraries and tools for Robotic Process Automation (RPA), designed to be used with both Robot Framework and Python
https://www.rpaframework.org/
Apache License 2.0
1.17k stars 225 forks source link

How to interact with Web page elements inside WPF application #1120

Closed revathikanakachalam closed 1 year ago

revathikanakachalam commented 1 year ago

I am new to windows app automation. Our application is created using WPF framework. We are using RPA.Windows library for automation. Login page is web page that is embedded inside WPF windows, I am unable to interact with elements in the login page, it throws error as "Element not found". When I inspect the page for all elements of the page the "FrameworkId" is shown as "Chrome".

Below is the inspect screen shot MicrosoftTeams-image (14)

Error thrown on performing Click using RPA.Windows library (Click name:"Email")

RPA.Windows . Click name:"Email"

|Documentation:|Mouse click on element matching given locator.|
| --- | --- |
|Tags:|action, mouse|
|Start / End / Elapsed:|20231026 11:32:27.802 / 20231026 11:32:38.225 / 00:00:10.423|

11:32:27.805 INFO Getting element with locator: name:"Email"

11:32:27.954 INFO Resulted root element: WindowsElement(item=<uiautomation.uiautomation.PaneControl object at 0x000001A6D61D5CD0>, locator=None, name='Desktop 1', automation_id='', control_type='PaneControl', class_name='#32769', left=0, right=1920, top=0, bottom=1080, width=1920, height=1080, xcenter=960, ycenter=540)

11:32:27.954 INFO Locator 'name:"Email"' produced matcher: MatchObject(locators=[('Name', 'Email', 0)], _classes=set(), max_level=0)

11:32:38.219 INFO 2023-10-26 11:32:38.218 locators.py[274] _get_control_from_params -> Find Control Timeout(10s): {Name: 'Email'}

11:32:38.219 FAIL ElementNotFound: Element not found with locator 'name:"Email"'

Appreciate any help

cmin764 commented 1 year ago

Closing this in favour to the forum post. (please use GitHub to report issues/bugs in the library)