Vbscript 使用qtp函数单击特定链接
我想通过创建一个在操作中调用的函数来自动登录flipkartVbscript 使用qtp函数单击特定链接,vbscript,qtp,hp-uft,Vbscript,Qtp,Hp Uft,我想通过创建一个在操作中调用的函数来自动登录flipkart Function Website() 'this is the function Systemutil.Run("iexplore.exe"), "http://www.flipkart.com" End Function 网站()'这是在操作中调用函数的地方 浏览器正在打开,但我不知道如何在不做记录的情况下单击登录并运行,而只是通过代码和函数 请帮帮我 如果您想使用描述性编程,这将是一个简单的示例: (我使用了直接登录页面,因为
Function Website() 'this is the function
Systemutil.Run("iexplore.exe"), "http://www.flipkart.com"
End Function
网站(
)'这是在操作中调用函数的地方
浏览器正在打开,但我不知道如何在不做记录的情况下单击登录并运行,而只是通过代码和函数
请帮帮我 如果您想使用描述性编程,这将是一个简单的示例: (我使用了直接登录页面,因为它比点击登录链接更容易)
您可以从这里选择两种方法。 1.对象存储库:按Ctrl+R打开对象存储库。然后将对象添加到存储库中。添加它们后,只需拖放即可
您打算使用对象存储库还是使用描述性编程?
Website()
Function Website()
Systemutil.Run("iexplore.exe"), "https://www.flipkart.com/account/login?from=header"
set objPage = Browser("title:=Flipkart.com: Login.*").Page("title:=Flipkart.com: Login.*")
objPage.Sync()
objPage.WebEdit("html id:=login_email_id1").Set "UsernameXY"
objPage.WebEdit("html id:=login_password1").Set "SecretPassword"
objPage.WebButton("html id:=login-cta").Click()
End Function