X-1.0rc2: "with Region:" and "Region.click()" with App().window() --- workaround: use Region(...)

Bug #695720 reported by jcppkkk
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
SikuliX
In Progress
Medium
RaiMan

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

Tags: fkt-app
RaiMan (raimund-hocke)
summary: - [Sikuli X] "with Region:" and "Region.click()" fail when using region
+ X 1.0rc1: "with Region:" and "Region.click()" fail when using region
returned by App().window()
RaiMan (raimund-hocke)
summary: - X 1.0rc1: "with Region:" and "Region.click()" fail when using region
- returned by App().window()
+ X 1.0rc1: "with Region:" and "Region.click()" fail (e.g. App().window()
+ )
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Undecided → Medium
RaiMan (raimund-hocke)
summary: - 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: - X 1.0rc1: "with Region:" and "Region.click()" with App().window() ---
+ X-1.0rc2: "with Region:" and "Region.click()" with App().window() ---
workaround
description: updated
Changed in sikuli:
milestone: none → x1.0-rc3
Changed in sikuli:
status: New → Fix Committed
RaiMan (raimund-hocke)
Changed in sikuli:
assignee: nobody → RaiMan (raimund-hocke)
milestone: x1.0-rc3 → x1.0
tags: added: fkt-app
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Medium → High
summary: X-1.0rc2: "with Region:" and "Region.click()" with App().window() ---
- workaround
+ workaround: use Region(...)
RaiMan (raimund-hocke)
Changed in sikuli:
importance: High → Medium
status: Fix Committed → In Progress
milestone: x1.0 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.