点击使用qtp功能的特定链接 [英] clicking on particular link using qtp function
本文介绍了点击使用qtp功能的特定链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想通过创建一个在动作中被调用的函数来使登录过程自动化到flipkart
I want to automate login process to flipkart by creating a function which is being called in an action
Function Website() 'this is the function
Systemutil.Run("iexplore.exe"), "http://www.flipkart.com"
End Function
Website(
)'这是在操作中调用函数的位置
Website(
) 'this is where the function is called in the action
浏览器正在打开,但我不知道如何在不进行记录和运行的情况下单击登录,而只能通过代码和功能来
The browser is opening but I don't know how to click on login without doing a record and run , but only through code and the function.
请帮助我.
推荐答案
如果要使用描述性编程来做,这将是一个简单的示例: (我使用直接登录页面,因为它比单击该登录链接更容易)
If you want to do it with descriptive programming, this would be a simple example: (I used the direct login-page, because it is easier than clicking on that login link)
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
这篇关于点击使用qtp功能的特定链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文