Page 1 of 1

Get WPF DataContext via Ranorex API

Posted: Tue Dec 21, 2021 1:37 pm
by moerwald
Hi,

unfortunately I've a complex WPF GUI to test. Actually some data I want to validate is only avaiable as bound DataContext in WPF. Is it possible to retrieve the WPF DataContext of a WPF control via the Ranorex API?

Thx

Re: Get WPF DataContext via Ranorex API

Posted: Tue Dec 21, 2021 10:52 pm
by Jacob
Hi moerwald!

Welcome to the forums! This may be possible depending on how the application is configured. One thing that may help would be to go into the Plugin Settings (Settings -> Plugins Tab -> WPF) and set the "Show All Elements" option to "True." Barring that, it may still be possible to pull that information using the GDI+ Capture functionality.