sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #10702
Re: [Bug 999329] Re: is there a bug in how regions are handled for windows?
thanks.
-----Original Message-----
From: RaiMan <rmhdevelop@xxxxxx>
To: abetv <abetv@xxxxxxx>
Sent: Tue, May 15, 2012 3:35 am
Subject: [Bug 999329] Re: is there a bug in how regions are handled for windows?
The App class is implemented differently on Windows.
So you have to script differently for Mac and Windows using ENV.getOS().
for Windows:
openApp("absolute-path-to-Firefox.exe")
wait(3)
myApp = App("some Firefox window title")
reg = myApp.window()
Take care:
- Firefox must be configured, to show window titles
- FF.window(0) might not be the window, you are looking for, since FF has
multiple windows open most of them hidden.
the following loop might help:
for i in range(100):
w = myApp.window(i)
if not w: break
print w # region info
# see comment
comment:
you should try that loop once, to get an insight on FF's open windows and find
out, how to select the one you need.
Another possibility to try:
switchApp("some Firefox window title")
reg = App.focusedWindow()
** Changed in: sikuli
Status: New => Invalid
--
You received this bug notification because you are subscribed to the bug
report.
https://bugs.launchpad.net/bugs/999329
Title:
is there a bug in how regions are handled for windows? --- no, it is
the App class's differences on Mac and Windows
Status in Sikuli:
Invalid
Bug description:
I am implementing some clicks and image verification within a region and found
out that it works on MAC but not with windows.
Is there a bug on windows not understanding regions or am I doing something
wrong?
here is the sample code:
myApp App('firefox')
myApp.open()
reg = Region( myApp.window() )
reg.click('image')
[[ or do this => ]] assert reg.exists( image)
If I ran that code on a MAC, it is able to click or verify that image, but
when running it on windows xp, it is not able to find it.
I verified it by removing the reg. from click and exists on windows and it
would work
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/999329/+subscriptions
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/999329
Title:
is there a bug in how regions are handled for windows? --- no, it is
the App class's differences on Mac and Windows
Status in Sikuli:
Invalid
Bug description:
I am implementing some clicks and image verification within a region and found out that it works on MAC but not with windows.
Is there a bug on windows not understanding regions or am I doing something wrong?
here is the sample code:
myApp App('firefox')
myApp.open()
reg = Region( myApp.window() )
reg.click('image')
[[ or do this => ]] assert reg.exists( image)
If I ran that code on a MAC, it is able to click or verify that image, but when running it on windows xp, it is not able to find it.
I verified it by removing the reg. from click and exists on windows and it would work
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/999329/+subscriptions
References