我正在使用一种测试工具,并使用Sikuli来模拟用户对Web应用程序的请求。用于在sikuli脚本中检索浏览器URL的命令
有没有办法让我在浏览器地址栏中找到url(点击特定链接后)?
任何帮助,指向文档的指针将不胜感激
干杯!
我正在使用一种测试工具,并使用Sikuli来模拟用户对Web应用程序的请求。用于在sikuli脚本中检索浏览器URL的命令
有没有办法让我在浏览器地址栏中找到url(点击特定链接后)?
任何帮助,指向文档的指针将不胜感激
干杯!
在Sikuli没有办法做到这一点。我可以推荐你使用Selenium。这是Web测试的最佳框架。
我会这样做的击键。选择全部,使用剪贴板复制粘贴。
click("url.png") # select the url location; may be a bit iffy/browser dependent
type("a", KEY_CTRL) # select all
type("c", KEY_CTRL) # copy to clipboard
click("target.png") # go to your target
type("v", KEY_CTRL) # and paste
简单的解决方案
click(your link);sleep(2) # or wait for loading to finish via an exists()
type("l",Key.CTRL) # hotkey for address bar selection on FF and GC
type("c",Key.CTRL) #copies
选择地址栏通常也可以使用Ctrl + L键来完成,见http://www.computerhope.com/tips /tip18.htm – Bookeater