← Back to team overview

sikuli-driver team mailing list archive

[Question #163486]: TypeError: click(): expected 2 args; got 1

 

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

Hello sikuli! I'm back! I have a very frustrating issue and wondering if anyone can help me. I have been playing with sikuli for a while now and can claim myself as an intermediate user any.

code: (NOT WORKING)
Region_Menu_Guide=find("Main.png") #Find this image anywhere on the screen
Region_Menu=Region(Region_Menu_Guide).left(200) #Create a New region 200 pixel left of the finding image
Region_Menu.setH(600) # setting New region height by 600
Region_Menu.setW(600) # setting new region width by 600
Region_Screen.highlight(5) # Highlight the new region area so I can see where it is

Region_Menu.click("godhand.png")

ERROR: TypeError: click(): expected 2 args; got 1
--------------------------------
code: (WORKING)
Region_ItemArea_Guide=find("Dish.png") #Find this image anywhere on the screen
Region_ItemArea=Region(Region_ItemArea_Guide) #Create a New region (Notice I don't have a .left here)
Region_ItemArea.setH(350) # setting New region height by 350 (Notice it's height is shorter)
Region_ItemArea.setW(250) # setting new region width by 250 (Notice it's width is smaller
Region_ItemArea.highlight(5) # Highlight the new region area so I can see where it is

Region_ItemArea.click("Dish.png")
bam bing boom etc.. continuing to next function

As simple as it looks the top code isn't working compare to the bottom code. Please help :) 
If I have to guess I think it could be something wrong with .left, .above, .right etc class

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