← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #266136]: Sikuli CodeCompletion with PyCharm

 

Question #266136 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/266136

    Status: Open => Answered

RaiMan proposed the following answer:
This is not a bug --- this is by design ;-)

the use of undotted Region methods like click(), find() is a convenience from the beginning of Sikuli and should not be used in serious programming.
these undotted methods are bound dynamically at runtime to a "constant" object SCREEN which is set to Screen(0).

Since code completion is static in the sense, that it happens before
runtime, this cannot be solved currently.

The only solution is to avoid the usage of these undotted Region
methods.

The other solution is to create your own wrapper class for all the
functions you want to use undotted and import this at the beginning. I
did not test this yet though, so it might be, that only wrapping is not
enough.

the "serious" approach:

scr = Screen(0)
scr.click(someImage)

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