Functional Test: SIKULI doesn't work with basic Google Chrome

此生再无相见时 提交于 2019-12-13 04:46:34

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!