← Back to team overview

sikuli-driver team mailing list archive

[Question #201531]: Unable to click in random location based on image search.

 

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

Hello,

I am helping a friend with android prototyping, long story short I am trying to simulate random input (clicks in this case) around a specific location (a pattern). 

To accomplish this I've tried all sorts of random algorithms provided by jython and both java.  The end result is the same, 
TypeError: offset(): 1st arg can't be coerced to int

I have even looked up the questions and examples of others and used alternative modifiers and I still end up with the issue of "can't be coerced to int"
(function I've used, .targetOffset() .offset(), .left()  .up(), etc)

I've even played with the various forms of random within Jyton, random.random(), .randrange(), .choice(), etc.  I've also explored Math.random() within java.  The result is always the same. 

#-------------------
import java.util.Random
import random

def x():
    random.randint(0,10)

b = wait("1340345219668.png")
click(b.getCenter().offset(x,x))
#-------------------

If anyone has any suggestions I'd greatly appreciate any help offered.

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