Automation of Custom Controls in IronPython

Class library usage, coding and language questions.
WombatPM
Posts: 2
Joined: Wed Jan 13, 2010 10:33 pm

Automation of Custom Controls in IronPython

Post by WombatPM » Wed Jan 13, 2010 10:47 pm

I'm trying to use Ranorex to automate/test a process involving some legacy apps. The Apps make heavy use of ListView20WndClass List View controls that were common as an OCX in VisualBasic 6 Applications. Based on the docs on here and elsewhere I should be able to access the data if I write/extend the control class. I'm a pythonista, so my C# skills are very lacking.

Q1) Can you subclass and extend in IronPython or must it happen in C#? Any Examples?

Q2) If I must do it in C# are then any complete examples for ListView controls with step-by-step instructions?

Thanks. If I can get my proof of concept to work, I can make the case to buy several licenses.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Automation of Custom Controls in IronPython

Post by Support Team » Fri Jan 15, 2010 10:13 am

I'm not sure which documentation you refer to, but if it is the blog "Enabling automation for 3rd party controls by adding Accessibility" than you need to extend your ListView20WndClass control. I.e. you do not extend Ranorex, but the application you are testing! So, the programming language that can be used to extend your legacy control depends on how your control is developed. If it is a VisualBasic application, then I guess you need to use VisualBasic to extend the control.

Again, if you refer to the blog mentioned above, you do not extend/write Ranorex code, but you need to extend your legacy control to support Microsoft Accessiblity (see the following blog for more information: http://www.ranorex.com/blog/enabling-au ... s-controls).

Regards,
Alex
Ranorex Support Team
.
Image

WombatPM
Posts: 2
Joined: Wed Jan 13, 2010 10:33 pm

Re: Automation of Custom Controls in IronPython

Post by WombatPM » Sat Jan 16, 2010 12:22 am

Except I'm not the developer. This is an external 3rd party app so no source code. Seems like my problem was in trying to use Ranorex as an automation tool like autoit instead of as a testing tool. Once again square pegs and round holes do not mix. Thanks for the reply. I'll continue testing Ranorex for my new product development.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Automation of Custom Controls in IronPython

Post by Support Team » Mon Jan 18, 2010 12:20 pm

If you are not the developer of the control, i.e. if you cannot extend the control's MSAA support, there is the possibility of creating a Ranorex plugin that communicates with your control and that way integrates support for that control into Ranorex. The problem is that currently creating a Ranorex plugin needs special training, since the Ranorex Plugin SDK (including documentation and plugin samples) is not yet released.
WombatPM wrote:Seems like my problem was in trying to use Ranorex as an automation tool like autoit instead of as a testing tool.
Ranorex is an automation tool like AutoIt, both can be used for software testing. However, Ranorex being a commercial tool has a lot of advantages over AutoIt, e.g.:
  • Ranorex has much higher object identification capabilities and supports far more technologies
  • Record-Replay functionality (Ranorex Recorder)
  • provides support for software testing
  • is far more powerful being built on the .NET Framework
  • ... (list is not complete :-))
Regards,
Alex
Ranorex Support Team
.
Image