có bạn nào biết cái link clip hướng dẫn test gmail cho mình xin với!
thank!
quick test pro
Forum rules
Thảo luận về phần mềm Quick Test Pro QTP
Thảo luận về phần mềm Quick Test Pro QTP
-
- Hoc Tester
- Posts: 4
- Joined: Mon 21 Jan, 2013 10:42 pm
- Contact:
-
- Admin
- Posts: 4900
- Joined: Tue 10 Aug, 2010 10:11 am
- Location: HCM
- Contact:
Re: quick test pro
Bạn copy cả cái code này vào QTP rồi chạy thử nhadangvantrung wrote:có bạn nào biết cái link clip hướng dẫn test gmail cho mình xin với!
thank!
Code: Select all
'Launching Internet Explorer and Opening Gmail Application
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate "http://www.gmail.com"
'We will use the sync method to wait till Gmail opens
Browser("Title:=Gmail.*").Page("title:=Gmail.*").Sync
'Script to set username and password to login
Browser("Title:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=Email").Set "xxxxxx"
Browser("Title:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=Passwd").Set "yyyyyy"
Browser("Title:=Gmail.*").Page("title:=Gmail.*").WebButton("name:=Sign in").click
Browser("Title:=Gmail.*").Page("title:=Gmail.*").Sync
If Browser("Title:=Gmail.*").Page("title:=Gmail.*").Link("innertext:=Sign out", "html id:=:.*").Exist(1) Then
'Print a Pass message for the user if logged in
Print "User " &Username& " is successfully Logged in"
Else If not Browser("Title:=Gmail.*").Page("title:=Gmail.*").Link("innertext:=Sign out", "html id:=:.*").Exist(1) Then
'Print a Fail message for the user if not able to log in and terminate the action
Print "User " &Username& " is not able to Login in"
Print "The Test has been terminated"
ExitAction
End If
End If
-
- Hoc Tester
- Posts: 4
- Joined: Mon 21 Jan, 2013 10:42 pm
- Contact:
Re: quick test pro
bạn ơi cái này chỉ để test mỗi cái user xxxx với cái pass yyyy thui
bạn có cách nào để mình có thể test dc các test case nhập từ bàn phím không?
bạn có cách nào để mình có thể test dc các test case nhập từ bàn phím không?
-
- Hoc Tester
- Posts: 4
- Joined: Mon 21 Jan, 2013 10:42 pm
- Contact:
Re: quick test pro
cái này chỉ test được cái user xxxx với pass yyyy thui bạn,có cách nào để test được các user và pass từ bảng data không bạn
-
- Admin
- Posts: 4900
- Joined: Tue 10 Aug, 2010 10:11 am
- Location: HCM
- Contact:
Re: quick test pro
Bạn xem video này có hướng dẫn tạo data driven trong QTP nè.dangvantrung wrote:cái này chỉ test được cái user xxxx với pass yyyy thui bạn,có cách nào để test được các user và pass từ bảng data không bạn