← Back to team overview

sikuli-driver team mailing list archive

[Bug 778819] Re: X-1.0rc2: Region spatial operators (nearby, left, right, ...) do not return a Region object --- workaround

 

** Tags added: fkt-region

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/778819

Title:
  X-1.0rc2: Region spatial operators (nearby, left, right, ...) do not
  return a Region object --- workaround

Status in Sikuli:
  Fix Committed

Bug description:
  affected is the Python level
  they seem to return a Region object from the Java level, that cannot be used the same way on the Python level
  This gives errors when trying to use Region methods with these Regions (like Region.click())

  *** workaround
  cast the region to a Region object on the Python level, e.g.
  Region(other_region.nearby(100)).click("some-image.png")
  -------------------------------------------------------------------------------------------

  This gives the error above:

      for ready in region.findAll(status):
        ready.nearby(100)).click(ok)

  Note that this also gives the same error:

      for ready in region.findAll(status):
        ready = Region(ready)
        ready.nearby(100).click(ok)

  Only this one works without `click(): expected 2 args; got 1` error:

      for ready in region.findAll(status):
        Region(ready.nearby(100)).click(ok)

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/778819/+subscriptions


References