sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #01363
[Bug 695720] Re: X 1.0rc1: "with Region:" and "Region.click()" with App().window() --- workaround
** Summary changed:
- X 1.0rc1: "with Region:" and "Region.click()" fail (e.g. App().window() )
+ X 1.0rc1: "with Region:" and "Region.click()" with App().window() --- workaround
** Summary changed:
- X 1.0rc1: "with Region:" and "Region.click()" with App().window() --- workaround
+ X-1.0rc2: "with Region:" and "Region.click()" with App().window() --- workaround
** Description changed:
- # I use Sikuli X on windows XP.
+ **** workaround ****
+ type cast to Region:
+ r = Region(App("application").window())
+ --------------------------------------------------------------------
+
+ # I use Sikuli X on windows XP.
# The Grouping Method Calls (with Region:) works when using Region()
def Region_with():
- reg = Region(468,212, 344, 570)
- reg.highlight(2)
- with reg:
- sleep(1)
+ reg = Region(468,212, 344, 570)
+ reg.highlight(2)
+ with reg:
+ sleep(1)
# But fails when using App().window()
def window_with():
- reg= App("SOMEAPP").window(0)
- reg.highlight(2)
- with reg:
- sleep(1)
+ reg= App("SOMEAPP").window(0)
+ reg.highlight(2)
+ with reg:
+ sleep(1)
# Error Message: AttributeError: 'org.sikuli.script.Region' object has
no attribute '__exit__'
-
# Simalar problem happend on reg.click(), works for Region()
def Region_click():
- reg = Region(468,212, 344, 570)
- reg.highlight(2)
- reg.click(image1)
+ reg = Region(468,212, 344, 570)
+ reg.highlight(2)
+ reg.click(image1)
# But fails on App().window()
def window_click():
- reg= App("SOMEAPP").window(0)
- reg.highlight(2)
- reg.click( image1)
+ reg= App("SOMEAPP").window(0)
+ reg.highlight(2)
+ reg.click( image1)
# Error Message: TypeError: click(): expected 2 args; got 1
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/695720
Title:
X-1.0rc2: "with Region:" and "Region.click()" with App().window() ---
workaround
Status in Sikuli:
New
Bug description:
**** workaround ****
type cast to Region:
r = Region(App("application").window())
--------------------------------------------------------------------
# I use Sikuli X on windows XP.
# The Grouping Method Calls (with Region:) works when using Region()
def Region_with():
reg = Region(468,212, 344, 570)
reg.highlight(2)
with reg:
sleep(1)
# But fails when using App().window()
def window_with():
reg= App("SOMEAPP").window(0)
reg.highlight(2)
with reg:
sleep(1)
# Error Message: AttributeError: 'org.sikuli.script.Region' object has
no attribute '__exit__'
# Simalar problem happend on reg.click(), works for Region()
def Region_click():
reg = Region(468,212, 344, 570)
reg.highlight(2)
reg.click(image1)
# But fails on App().window()
def window_click():
reg= App("SOMEAPP").window(0)
reg.highlight(2)
reg.click( image1)
# Error Message: TypeError: click(): expected 2 args; got 1
References