how to write the descriptive programming in QTP for
loginwindow.without using Step generator,object repository
for referecnes
Answers were Sorted based on User's Feedback
Answer / shyam.meghansh
how to write the descriptive programming in QTP for
loginwindow.without using Step generator,object repository
for referecnes
V can write Descriptive program in two different ways
Type 1:
SystemUtil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe","","C:\Program
Files\Mercury Interactive\QuickTest
Professional\samples\flight\app\","open"
Dialog("Text:=Login").WinEdit("Attached text:=Agent
Name:").set "shyam"
Dialog("Text:=Login").WinEdit("Attached
text:=Password:").set "mercury"
Dialog("Text:=Login").WinButton("text:=OK").click
Type 2:
SystemUtil.Run "C:\Program Files\Mercury
Interactive\QuickTest
Professional\samples\flight\app\flight4a.exe","","C:\Program
Files\Mercury Interactive\QuickTest
Professional\samples\flight\app\","open"
Set login=Description.Create()
login("text").value="login"
Set agentname=Description.Create()
agentname("Attached text").value="Agent Name:"
Set password=description.Create()
password("Attached text").value="Password:"
Set ok=Description.Create()
ok("text").value="OK"
Dialog(login).winedit(agentname).set "shyam"
Dialog(login).winedit(password).set "mercury"
dialog(login).winbutton(ok).click
If any other questions mail me
testingwithshyam@gmail.com
Is This Answer Correct ? | 17 Yes | 1 No |
Answer / kishorekumar.byreddy
Dim lg,an,pwd,ok
set lg=decription.create()
set an=decription.create()
set pwd=decription.create()
set ok=decription.create()
lg("text").value="LOGIN"
an("attached text").value="AGENT NAME:"
pwd("attached text").value="PASSWORD:"
ok("text").value="OK"
Dialog(lg).activate
Dialog(lg).winedit(an).set"kishore"
Dialog(lg).winedit(pwd).setsecure"mercury"
Dialog(lg).winbutton(ok).click
i think this is the perfect to login descriptive 2nd method
this is very importent, every company prefer to this method
in realtime also, so please carefull
any queries on this please send to this
mail "kishorekumarbyreddy@gmail.com"
and this my num: 09811244850
Is This Answer Correct ? | 6 Yes | 3 No |
Answer / grsmrc2118@yahoo.com
hi you can write it by taking assistance from objectspy and
looking at methods and properties
dialog("text:=login).activate
dialog("text:=login).winedit("attachedtext:=agent
name:").set "mayur"
dialog("text:=login).winedit
("attachedtext:=password").setsecure "*********************"
dialog("text:=login").winbutton("text:=OK").click
but the better answer in interviews is explain that it is
hard to remember all the methods so by taking assistance
from object spy we are going to write
regards
naidu
Is This Answer Correct ? | 4 Yes | 9 No |
In Test Directory, What are the contents in test case designing? if you prepare in excel sheet how u use thrw Test Directory?
VM1 = "Invalid username or password. Please try again. " VM2 = "Email id is required.Password is required. " VM3 = "Email id is an invalid e-mail address.Password is required. " VM4 = "Password is required. " VM5 = "Email id is required. " VM6 = "Email id is an invalid e-mail address. " 'Rowcount of the Local sheet Rowcount = DataTable.GetSheet("Invalid login transactions").GetRowCount 'Valid emailid and Password Emailid = "test@iteamic.com" Password = "Password0" 'For i = 1 to Rowcount 'Parameterised Email_id Browser("Browser").Page ("Page").WebEdit("emailAddress").Set DataTable("Email_id", dtLocalSheet) EID = Browser("Browser").Page ("Page").WebEdit("emailAddress").GetRoProperty("value") 'Parameterised Password Browser("Browser").Page ("Page").WebEdit("password").Set DataTable("Password", dtLocalSheet) PWD = Browser("Browser").Page ("Page").WebEdit("password").GetROProperty("Value") If EID = Emailid And PWD = Password Then Reporter.ReportEvent micPass, "EID & PWD check", "Email id and Password is correct, One iteration of Invalid login attempts is not being executed" Else Browser("Browser").Page("Page").WebButton ("Sign-In").Click 'Output value exported to the local sheet Browser("Browser").Page ("Page_2").Output CheckPoint("Home page_Sign in") 'Storing the output value in a variable(OUTPUT OUTPUT = Datatable.GetSheet ("Invalid login transactions").Getparameter ("Validation_message_signin").value 'comparing the Variable Output and the Validation message for a given input If OUTPUT = VM1 Then Reporter.ReportEvent micPass, "VM1", "Invalid username or password. Please try again. " else if OUTPUT = VM2 Then Reporter.ReportEvent micPass, "VM2", "Email id is required.Password is required. " else if OUTPUT = VM3 Then Reporter.ReportEvent micPass, "VM3", "Email id is an invalid e-mail address.Password is required. " else if OUTPUT = VM4 Then Reporter.ReportEvent micPass, "VM4", "Password is required. " else if OUTPUT = VM5 Then Reporter.ReportEvent micPass, "VM5", "Email id is required. " else if OUTPUT = VM6 Then Reporter.ReportEvent micPass, "VM6", "Email id is an invalid e-mail address. " else Reporter.ReportEvent micFail, "EID & PWD check_FAIL", "Validation message checkpoint failed. The captured v msg is not required" End if End if I am getting syntax error saying "Expected 'End If'" at the last line, Why is this? Kindly explain...
Is it possible to change the values of analog recording?
How can i check items sorted or not in a weblist ? Give me the script for this...
How we can add actions in the test using QTP?
wt is memory leakage?
how do you run scripts in QTP?please anyone can answer my questions
Have you used xml check point in your project?
Hi All, What is an XML Checkpoint in QTP? How can i use it while testing a web application? Kindly explain in detail. Thanks in advance
why we use environment variables
what is the difference between call to copy action and call to an existing action
I want to run my qtp scipt on the system where qtp is not installed .I don't want to install qtp but i want that system should use the qtp from another system in lan just the qtp instance should be launched on that system without having qtp installed on it .I probably know the solution that it will be solved through RMI but how to get this problem solved plz help i anyone know the answer