AutoHotkey Community

It is currently May 25th, 2012, 3:20 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 15 posts ] 
Author Message
PostPosted: November 3rd, 2006, 12:06 pm 
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..]
8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2006, 12:19 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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 :)

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2006, 1:18 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
majkinetor wrote:
I start to learn Python today :)
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! ;-)

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2006, 1:43 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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. :)


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)


_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 3rd, 2006, 2:14 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
majkinetor wrote:
Looks like your LUA idea is here, just with Python. :)
A Lua binding can be done easily too... It is just some work.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Last edited by PhiLho on December 5th, 2006, 4:31 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 5th, 2006, 3:41 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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


_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 5th, 2006, 4:34 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Ugh, they top-posted! :-(
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... ;-)

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 5th, 2006, 5:34 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 5th, 2006, 8:15 pm 
And he's working for the Yugoslavian Gouvernment ?miodrag.milic@trezor.sr.gov.yu


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 6th, 2006, 9:20 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Yup.

I am programer, system & security analist for Department of the Treasury

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2007, 8:24 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
It seems they implemented my wish but in Pro version. They call it action keys.

More info:
http://www.ranorex.com/products/ranorexpro/

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 2nd, 2007, 7:53 am 
Offline

Joined: June 20th, 2005, 9:13 pm
Posts: 37
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2007, 10:04 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Nor anyhting else designed to be used with native Win controls.

Whats true with Mozzila, is true for IE and Opera too.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2007, 10:55 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
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.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2007, 11:26 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 6 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group