Change SWT Legacy Automation mode in code

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
TheNoobie
Posts: 2
Joined: Tue Dec 04, 2018 9:52 pm

Change SWT Legacy Automation mode in code

Post by TheNoobie » Tue Dec 04, 2018 9:59 pm

Hey guys!

Does anyone of you know how to change the setting "Use SWT legacy automation mode" in code?
I have to change it in runtime, since I would have to rework my whole repository if I can't.

Thanks!
Noob

User avatar
RobinHood42
Posts: 324
Joined: Fri Jan 09, 2015 3:24 pm

Re: Change SWT Legacy Automation mode in code

Post by RobinHood42 » Wed Dec 05, 2018 10:58 am

Hey,

Just use the following line of code:
Configuration.Current["plugins.java.swtlegacymode"] = true;
Cheers,
Robin :mrgreen:

TheNoobie
Posts: 2
Joined: Tue Dec 04, 2018 9:52 pm

Re: Change SWT Legacy Automation mode in code

Post by TheNoobie » Wed Dec 05, 2018 3:01 pm

Thanks Robin!
Works like a charm! :D

NuzakFarnas
Posts: 10
Joined: Tue Nov 05, 2019 5:17 am

Identifying objects of desktop application created using FoxPro!!

Post by NuzakFarnas » Fri Jan 03, 2020 3:47 pm

I am facing issues with the Objects identification of a desktop application created using FoxPro. When using Spy the text field or a button is shown on a different location of the application and we are unable to locate the fields using xPath. We doesn't have a proper ID for every element. Mouse clicks are not working hence the test cases is getting failed. Record and play back is also getting failed most of the times.
Can anyone give a better idea on how to test an application built using FoxPro.10.0.0.0.1 192.168.1.254 hotmail.com
Last edited by NuzakFarnas on Sat Jan 04, 2020 5:22 am, edited 1 time in total.

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

Re: Change SWT Legacy Automation mode in code

Post by odklizec » Fri Jan 03, 2020 4:03 pm

Hi,

I’m afraid, that without seeing the AUT snapshot and example of failing xpath(s), it’s impossible to suggest something reliable. Generally speaking, if there are no unique IDs available, you will have to use either other elements (e.g. labels) to identify nearest parent/sibling and from there find the element you want. But as mentioned, we need to see the AUT’s snapshot (NOT screenshot) to suggest something reliable.
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