AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ranorex - Test and Automation Lib [C++/Python/NETs]

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources
View previous topic :: View next topic  
Author Message
BoBo
Guest





PostPosted: Fri Nov 03, 2006 11:06 am    Post subject: Ranorex - Test and Automation Lib [C++/Python/NETs] Reply with quote

Quote:
Automated software testing with Ranorex
Ranorex is a Windows GUI test and automation Library for C++, Python and for the .Net languages. Ranorex doesn't have a scripting language of its own like other test tools. The user (e.g. the software tester) should use the functionalities of the powerful programming languages like Python or C # as a base, and enlarge it with the GUI automation functionality of Ranorex.

Use our software automation tool to control your Windows GUI Applications. Apply Ranorex for effective software tests to guarantee your software quality. Make small automated scripts for repeated actions. Embed our automation library in your software project to be able to run automated GUI operations. Ranorex is able to access all elements in a windows application or web page.

Ranorex works with Windows 2000, Windows XP and Windows Vista.

Ranorex is Freeware. You may use this software for free as long as you want.

[More..]
Cool
Back to top
majkinetor



Joined: 24 May 2006
Posts: 3644
Location: Belgrade

PostPosted: Fri Nov 03, 2006 11:19 am    Post subject: Reply with quote

That is absolutely fantastic !!!!!!!!!!!!!!

I suggest everybody to download Ranorex and to try sample applications and see the docs.


I know just one thing: I start to learn Python today Smile
_________________
Back to top
View user's profile Send private message MSN Messenger
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Fri Nov 03, 2006 12:18 pm    Post subject: Reply with quote

majkinetor wrote:
I start to learn Python today Smile
Basically, it seems to be a good idea... Lot of people say it is a fine language.
I want to learn since a long time, but never took time to loop deeply inside.

BoBo, this is a good finding. This is not the first test automation tool, but these are rarely free... Looks like a serious concurrent of AutoHotkey... and AutoIt! Wink
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 3644
Location: Belgrade

PostPosted: Fri Nov 03, 2006 12:43 pm    Post subject: Reply with quote

Quote:
Lot of people say it is a fine language.

Yeah, I heard good stories about it to, from very respectable programmers.

Quote:
Looks like a serious concurrent of AutoHotkey... and AutoIt!

My thought too.
Looks like your LUA idea is here, just with Python. Smile


This is sample script from documentation:

Code:

#---------------------------------------------------------------------------------------------
# CalcTest1-de.py - Python testscript for Ranorex
#---------------------------------------------------------------------------------------------

"""CalcTest1-de.py -- demonstrates automated GUI testing of calc.exe with Ranorex
(german OS version)

Usage:  CalcTest1-de [sleeptime]

  sleeptime ... Integer value between 1 and 10000, indicating the interval (in milliseconds) you want the
  script process to be inactive between the commands (default=500).

CalcTest1-de.py demonstrates searching of forms, finding of controls by name and
clicking of buttons
"""

__version__ = 1, 0, 0

import sys
import RanorexPython as Ranorex

TESTED_APPLICATION_PATH = 'calc.exe'        # Name of the application
TESTED_APPLICATION_TITLE = 'Rechner'        # Title of calc.exe in german version

def printerror(*args):
    msg = ' '.join(args)
    sys.stderr.write(msg)
    sys.stderr.write("\n")

def main():
    if len(sys.argv) > 2:
        printerror("Too many arguments!\n\n" + __doc__)
        return 1

    sleeptime = 500
    # Reading sleeptime
    if len(sys.argv) == 2:
        sleeptime = int(sys.argv[1])
        if sleeptime < 1 or sleeptime > 10000:
            printerror("Arguments error, use a value between 1 and 10000!\n\n" + __doc__)
            return 2           

    print '---------------------------------------------------------------------'
    print ' General functions'
    print '---------------------------------------------------------------------'
    Ranorex.SetSleepTime(sleeptime)
    sleeptime = Ranorex.GetSleepTime()
    print '  SleepTime=' + str(sleeptime)
    Ranorex.Sleep(100)

    print '---------------------------------------------------------------------'
    print ' Activating Form: ' + TESTED_APPLICATION_TITLE
    print '---------------------------------------------------------------------'
    form = Ranorex.FormFindTitle(TESTED_APPLICATION_TITLE)
    if form == 0:
        print '   Form not found, starting application...' + TESTED_APPLICATION_PATH
        ret=Ranorex.ApplicationStart(TESTED_APPLICATION_PATH)
        if ret != 0:
            print '\nERROR: Cannot start application, please start the tested application calc.exe start the script again'
            return 3
        print '   Activating test application...'
        form=Ranorex.FormFindTitle(TESTED_APPLICATION_TITLE,Ranorex.MATCH_EXACT,1,5000)
        if form == 0:
            print 'Error: Form not found'       
            return 4
    print '   Form found, form=' + hex(form)


    print '--------------------------------------------------------------------'
    print ' Searching and testing buttons'
    print '---------------------------------------------------------------------'
    print '  searching button 2 by text'
    button2=Ranorex.FormFindChildText(form,'2',Ranorex.MATCH_EXACT)
    if button2 == 0:
        print 'ERROR: button button2 not found'
        return 5
    print '    button2=' + hex(button2)
    if Ranorex.ButtonClick(button2) == False:
        print 'ERROR: pressing button2'
        return 5           

    print '  searching button * by text'
    buttonx=Ranorex.FormFindChildText(form,'*',Ranorex.MATCH_EXACT)
    if buttonx == 0:
        print 'ERROR: button buttonx not found'
        return 5
    print '    buttonx=' + hex(buttonx)
    if Ranorex.ButtonClick(buttonx) == False:
        print 'ERROR: pressing buttonx'
        return 5           
 
    print '  searching button 3 by text'
    button3=Ranorex.FormFindChildText(form,'3',Ranorex.MATCH_EXACT)
    if button3 == 0:
        print 'ERROR: button button3 not found'
        return 5
    print '   button3=' + hex(button3)
    if Ranorex.ButtonClick(button3) == False:
        print 'ERROR: pressing button3'
        return 5           

    print '  searching button = by text'
    buttoni=Ranorex.FormFindChildText(form,'=',Ranorex.MATCH_EXACT)
    if buttoni == 0:
        print 'ERROR: button buttoni not found'
        return 5
    print '   buttoni=' + hex(buttoni)
    if Ranorex.ButtonClick(buttoni) == False:
        print 'ERROR: pressing buttoni'
        return 5           

    print '--------------------------------------------------------------------'
    print ' Closing application: ' + TESTED_APPLICATION_TITLE
    print '---------------------------------------------------------------------'
    Ranorex.ApplicationClose(TESTED_APPLICATION_TITLE)
    Ranorex.Sleep(1000)
    print 'End'

if __name__ == "__main__":
    ret = main()
    sys.exit(ret)


_________________
Back to top
View user's profile Send private message MSN Messenger
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Fri Nov 03, 2006 1:14 pm    Post subject: Reply with quote

majkinetor wrote:
Looks like your LUA idea is here, just with Python. Smile
A Lua binding can be done easily too... It is just some work.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Last edited by PhiLho on Tue Dec 05, 2006 3:31 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 3644
Location: Belgrade

PostPosted: Tue Dec 05, 2006 2:41 pm    Post subject: Reply with quote

Lets hope this is true

Quote:
Hi,



Thank you for your suggestion, it seems to be a very good idea.

We will discuss it for a feature release.



Best Regards



Jenö Herget

www.Ranorex.com




--------------------------------------------------------------------------------

From: Miodrag Milic [mailto:miodrag.milic@trezor.sr.gov.yu]
Sent: Tuesday, November 21, 2006 10:16 AM
To: jherget@ranorex.com
Subject: ranorex suggestion



Hi there.


I am wondering is it fesible to support hotkeys in ranorex. I know it is off-topic when automatition is in question in the core sense, but in practice it is extremely useful as proved by AutoHotKey project. AutoIt droped easy usage of hotkeys and bunch of users changed to AHK becaues of this (among other reasons)



In Ahk u can define whatever you like for hotkeys, not only ctrl shift alt combinations.

So you can for instance create handler for a+b. The syntax is very cool:



a&b::

WinGetActive ...

WinSetTitle ...

Click ...

return



or



MButton::AltTabMenu



It would be really nice to add such support natively in Renorax. Such thing can be done via system hooks, and also AHK is open source if you want to chek it out.





Thx for your time



Miodrag


_________________
Back to top
View user's profile Send private message MSN Messenger
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Tue Dec 05, 2006 3:34 pm    Post subject: Reply with quote

Ugh, they top-posted! Sad
A: Because it is hard to read!
Q: Why top-posting is bad?

You are learning Python, you are suggesting missing features, I feel what majkinetor messages will become very rare in this forum... Wink
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 3644
Location: Belgrade

PostPosted: Tue Dec 05, 2006 4:34 pm    Post subject: Reply with quote

Quote:
I feel what majkinetor messages will become very rare in this forum...

Confirmed.


Quote:
A: Because it is hard to read!
Q: Why top-posting is bad?

LOL
_________________
Back to top
View user's profile Send private message MSN Messenger
BoBo
Guest





PostPosted: Tue Dec 05, 2006 7:15 pm    Post subject: Reply with quote

And he's working for the Yugoslavian Gouvernment ?miodrag.milic@trezor.sr.gov.yu
Back to top
majkinetor



Joined: 24 May 2006
Posts: 3644
Location: Belgrade

PostPosted: Wed Dec 06, 2006 8:20 am    Post subject: Reply with quote

Yup.

I am programer, system & security analist for Department of the Treasury
_________________
Back to top
View user's profile Send private message MSN Messenger
majkinetor



Joined: 24 May 2006
Posts: 3644
Location: Belgrade

PostPosted: Fri Apr 27, 2007 7:24 am    Post subject: Reply with quote

It seems they implemented my wish but in Pro version. They call it action keys.

More info:
http://www.ranorex.com/products/ranorexpro/
_________________
Back to top
View user's profile Send private message MSN Messenger
Futurepower(R)



Joined: 20 Jun 2005
Posts: 35

PostPosted: Wed May 02, 2007 6:53 am    Post subject: Ranorex is limited in functionality. Reply with quote

Try RanorexSpy.exe. Note that, since all Mozilla products use a non-standard way of windowing, Ranorex cannot get the IDs of controls, and so cannot be used with Mozilla products and others like them.
Back to top
View user's profile Send private message
majkinetor



Joined: 24 May 2006
Posts: 3644
Location: Belgrade

PostPosted: Wed May 02, 2007 9:04 am    Post subject: Reply with quote

Nor anyhting else designed to be used with native Win controls.

Whats true with Mozzila, is true for IE and Opera too.
_________________
Back to top
View user's profile Send private message MSN Messenger
PhiLho



Joined: 27 Dec 2005
Posts: 6721
Location: France (near Paris)

PostPosted: Wed May 02, 2007 9:55 am    Post subject: Reply with quote

majkinetor wrote:
Whats true with Mozzila, is true for IE and Opera too.
Not exactly for IE, as you can access the address bar, read the alert() message boxes, and so on.
Anyway, it is true for all portable frameworks drawing their components instead of using Windows' native ones, unless they choose to emulate them, eg. by answering specific messages.
So most Java programs, Gtk+ programs, Rebol ones, and so on, are hard to script: you have to rely on keyboard interface, ImageSearch, and so on.
_________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Back to top
View user's profile Send private message Visit poster's website
majkinetor



Joined: 24 May 2006
Posts: 3644
Location: Belgrade

PostPosted: Wed May 02, 2007 10:26 am    Post subject: Reply with quote

Quote:
Not exactly for IE, as you can access the address bar, read the alert() message boxes, and so on.

You can read AB in Opera too (don't know about Mozzilla)

The fact that you can accutally read 2 or 3 controls doesn't mean anything, but just proves the point.
_________________
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Utilities & Resources All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group