问题
Someone mentionned me sikuli http://sikuli.org/ seems great.
I just try to go to yahoo with google chrome and it fails to paste the url at step 6 why ?
回答1:
If you perfrom a mouse click on the textfield with www.google.com in it, it will be marked with blue and so the picture changes. This means that the paste operation will fail because it cant find the picture in your screen.
In this case it would be better to just skip the image and paste it directly after the mouse click.
find("icon.png")
click("icon.png")
wait("textfield.png")
find("textfield.png" )
click("textfield.png" )
paste("yahoo.com")
type(Key.ENTER)
Hope this solves your problem.
回答2:
i believe that the image of "www.google.com" text had changed after the click operation,either the text getting highlighted or inserting a cursor image. try to remove the click
来源:https://stackoverflow.com/questions/6251517/functional-test-sikuli-doesnt-work-with-basic-google-chrome