Cannot make sikuli even go to yahoo from google

Asked by asksikuli

I just try to go to yahoo with google chrome and it fails to paste the url at step 6 why ?

see picture below

http://i.stack.imgur.com/Hi9Xw.jpg

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

-- 1. click/wait/paste include a find operation
so based on your script it is sufficient to say:
click(image-of-start-button) # finds and clicks
wait(google-logo, 5) # give it some time to come up
paste(image-www.google.com, "www.yahoo.com")
type(Key.ENTER)

-- 2. comment on paste():
it searches the given image, clicks it to get the focus to an input field and finally makes the paste-operation (internally a ctrl-c is simulated using the clipboard)

so the center of the image you use with paste has to be inside an input field that is intended to get the text input. You might use the preview feature to adjust the clickpoint (target offset).

-- 3. timing
After e.g. a click() you might have to wait for the application to react (an example is the above wait()) and change the screen content. So your workflow has to take this into account.

-- 4. Searching vs. typing
It is really amazing, what you can do with the Sikuli image related features. But in many cases it is much easier and more robust if there is some keyboard action possible to achieve what you want.

In your case e.g. you could use Win-R and paste the url:

type("r", KEY_WIN)
wait(2) # wait for the dialog box to be ready
paste("www.yahoo.com") # the input field is selected already
type(Key.ENTER)

this should open the web page in your default browser

Can you help with this problem?

Provide an answer of your own, or ask asksikuli for more information if necessary.

To post a message you must log in.