| View previous topic :: View next topic |
| Author |
Message |
BoBo Guest
|
Posted: Fri Nov 03, 2006 11:06 am Post subject: Ranorex - Test and Automation Lib [C++/Python/NETs] |
|
|
| 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..] |  |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3644 Location: Belgrade
|
Posted: Fri Nov 03, 2006 11:19 am Post subject: |
|
|
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  _________________
 |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Fri Nov 03, 2006 12:18 pm Post subject: |
|
|
| 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!  _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3644 Location: Belgrade
|
Posted: Fri Nov 03, 2006 12:43 pm Post subject: |
|
|
| 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)
|
_________________
 |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Fri Nov 03, 2006 1:14 pm Post subject: |
|
|
| 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. _________________
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 |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3644 Location: Belgrade
|
Posted: Tue Dec 05, 2006 2:41 pm Post subject: |
|
|
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 |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Tue Dec 05, 2006 3:34 pm Post subject: |
|
|
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...  _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3644 Location: Belgrade
|
Posted: Tue Dec 05, 2006 4:34 pm Post subject: |
|
|
| 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 |
|
 |
BoBo Guest
|
Posted: Tue Dec 05, 2006 7:15 pm Post subject: |
|
|
| 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
|
Posted: Wed Dec 06, 2006 8:20 am Post subject: |
|
|
Yup.
I am programer, system & security analist for Department of the Treasury _________________
 |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3644 Location: Belgrade
|
|
| Back to top |
|
 |
Futurepower(R)
Joined: 20 Jun 2005 Posts: 35
|
Posted: Wed May 02, 2007 6:53 am Post subject: Ranorex is limited in functionality. |
|
|
| 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 |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3644 Location: Belgrade
|
Posted: Wed May 02, 2007 9:04 am Post subject: |
|
|
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 |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Wed May 02, 2007 9:55 am Post subject: |
|
|
| 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 |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3644 Location: Belgrade
|
Posted: Wed May 02, 2007 10:26 am Post subject: |
|
|
| 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 |
|
 |
|