sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #18365
[Question #229884]: TypeError: org.python.proxies.sikuliwrapper$Region$3(): 1st arg can't be coerced to org.sikuli.script.Region, java.awt.Rectangle
New question #229884 on Sikuli:
https://answers.launchpad.net/sikuli/+question/229884
Hello,
I have this strange problem , I have two methods in a class , in the first method i am trying to create an application instance and assign it to class memeber using self.appInst = App.Open("PATH TO APP") and then bring it to focus using self.appInst.focus();wait(2) . This works perfectly fine . In the next class method , i am trying to bring the application under test to focus using self.appInst.focus();wait(2) but in this case Sikuli is throwing the error
File "C:\jython2.5.3\Lib\site-packages\sikuli\Region.py", line 27, in __init__ JRegion.__init__(self, args[0])
TypeError: org.python.proxies.sikuliwrapper$Region$3(): 1st arg can't be coerced to org.sikuli.script.Region, java.awt.Rectangle
Am i missing something here ?
Moreover this piece of code was working allright with out any issues and I am getting this error all of a sudden now , I do not see any major change in the code except that i have added this piece of code in the second Method
def Method2(self,*args):
..................
..................
self.appInst.focus(); wait(2)
with Region(self.appInst.window()):
with Region("Send_Get_Sync_Area.PNG") as searchRegion:
searchRegion.highlight(3)
onChange(50, _checkForStatusChange)
observe(background=True)
.......................
......................
Note if i comment out the lines below everything works as expected
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.