WinForms to WPF

Ask general questions here.
SirCook3141
Posts: 1
Joined: Mon Jul 08, 2019 9:33 pm

WinForms to WPF

Post by SirCook3141 » Mon Jul 08, 2019 9:37 pm

After spending months creating tests, our dev team swapped the main menu of our application from WinForms to WPF. Now all of my tests fail, (as they all use the main menu extensively). Is there a way for Ranorex to automagically adapt from WinForms to WPF?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: WinForms to WPF

Post by odklizec » Tue Jul 09, 2019 7:45 am

Hi,

There is definitely no automatic way to convert WinForms-based repo to WPF-based repo. You will have to update each repo item manually (using Ranorex Spy). There is unfortunately no other way. The good thing is, that your scenarios may stay unchanged, depending of the level of UI changes.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

reku
Posts: 1
Joined: Mon Aug 12, 2019 11:33 am

Re: WinForms to WPF

Post by reku » Wed Sep 04, 2019 10:50 am

SirCook3141 wrote:
Mon Jul 08, 2019 9:37 pm
After spending months creating tests, our dev team swapped the main menu of our application from WinForms to WPF. Now all of my tests fail, (as they all use the main menu extensively). Is there a way for Ranorex to automagically adapt from WinForms to WPF?
Sorry to say buddy, but how far I know there is no automatic process as of now. Hopefully they will bring soon!

Regards,
Reku Smith
Tutuapp ShowBox Kodi

User avatar
DrPsyche
Posts: 8
Joined: Tue Dec 11, 2018 12:27 pm

Re: WinForms to WPF

Post by DrPsyche » Wed May 26, 2021 12:04 pm

SirPhD wrote: ↑
Is there any online converter/tool to do my assignment and convert my Windows forms to WPF XAML Forms?
I've heard about an online Win2WPF converter, but have never used it myself.
Read this article > Converting WinForms to WPF: Should you consider it? by DevToolsGuy on infragistics.com

User avatar
doke
Posts: 112
Joined: Fri Mar 29, 2019 2:33 pm

Re: WinForms to WPF

Post by doke » Wed May 26, 2021 1:19 pm

Hi,

Can you move all your (modified) menu-items to a rooted folder in the repo ?
this would make modification probably easier.

The repo file is editable with text editor, so (regex) replacement can be done on content.
If the end part of your xpath is still the same you only have to change the rooted folder or the left part(s) of x-path.

Hope this helps!
Don