← Back to team overview

sikuli-driver team mailing list archive

[Question #139625]: [Sikuli X] "with Region:" and "Region.click()" fail when using region returned by App().window()

 

New question #139625 on Sikuli:
https://answers.launchpad.net/sikuli/+question/139625

# I use Sikuli X on windows XP. 
# the Grouping Method Calls (with Region:) works when using Region()
# works
def Region_with():
	reg = Region(468,212, 344, 570)
	reg.highlight(2)
	with reg:
		sleep(1)

# Error
# AttributeError: 'org.sikuli.script.Region' object has no attribute '__exit__'		
def window_with():
	reg= App("SOMEAPP").window(0)
	reg.highlight(2)
	with reg:
		sleep(1)


# Simalar problem happend on reg.click() 
# works
def Region_click():
	reg = Region(468,212, 344, 570)
	reg.highlight(2)
	reg.click(image1)

# Error
# TypeError: click(): expected 2 args; got 1
def window_click():
	reg= App("SOMEAPP").window(0)
	reg.highlight(2)
	reg.click( image1)


Is this a bug?

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.