|
写了一个简单的DP的QTP脚本,在IE上面能够run通,却发现在Firefox和Chrome上跑不了,大家能指点一下吗,QTP的DP支持Firefox和chrome吗?如果可以的话,DP对Firefox和Chrome需要注意一些什么?谢谢
- 'Variable declaration
- Dim GoogleBrowser
- Dim GooglePage
- Set GoogleBrowser=Browser("name:=Google.*")
- Set GooglePage=GoogleBrowser.Page("title:=Google.*")
- URL="http://www.google.com.hk/"
- 'SystemUtil.run "iexplore",URL
- 'SystemUtil.run "Firefox", URL
- SystemUtil.run "C:\Users\nancy.xu\AppData\Local\Google\Chrome\Application\chrome.exe",URL
- 'Write 'quicklearnqtp' in search box
- GooglePage.WebEdit("name:=q","type:=text","html tag:=INPUT").Set "Automation with QTP"
- 'Click on Google Search
- GooglePage.WebButton("name:=Google 搜索","type:=submit","html tag:=INPUT").Click
- 'Close browser
- 'GoogleBrowser.CloseAllTabs
复制代码 |
|