← Back to team overview

sikuli-driver team mailing list archive

[Bug 695720] [NEW] [Sikuli X] "with Region:" and "Region.click()" fail when using region returned by App().window()

 

Public bug reported:

# 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

** Affects: sikuli
     Importance: Undecided
         Status: New

-- 
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:
  [Sikuli X] "with Region:" and "Region.click()" fail when using region returned by App().window()

Status in Sikuli:
  New

Bug description:
  # 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





Follow ups

References