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



how to write the descriptive programming in QTP for loginwindow.without using Step generator,objec..

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

how to write the descriptive programming in QTP for loginwindow.without using Step generator,objec..

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

how to write the descriptive programming in QTP for loginwindow.without using Step generator,objec..

Answer / srinu

plz tel me how to write Descriptive on WEB application?

Is This Answer Correct ?    1 Yes 0 No

how to write the descriptive programming in QTP for loginwindow.without using Step generator,objec..

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

Post New Answer

More QTP Interview Questions

How will we compare the texts in the two word files using QTP writing the script in Descriptive Programming. Thanks

0 Answers  


What is the advantage of associating a procedure with a test object?

1 Answers  


What is RTM (require ment tracebulity marix) fromate?

0 Answers   Wipro,


tell me the script for envirnment value parameeter with an example. which situation envirnment valu parameter is used

2 Answers   HCL,


QTP Query: Hello to all, I'm getting an error (as below) when I perform descriptive programming on any Web application. "The test run cannot continue due to an unrecoverable error.The "myvar_0" object was not found in the Object Repository. Check the Object Repository to confirm that the object exists or to find the correct name for the object " But I do not have any problem when I perform the same descriptive programming on a Windows application such as Sample Application - Flight. Previosly , I had prepared a lot of scripts - both via creating the properties collection object and by giving the description in string arguments and implemented them on Flight and they're working perfectly fine.I'm using QTP Version 9.2 The sample script I have used for Web application is as below : Set myvar_0 = Description.Create 'Setting property collection object for Browser myvar_0("class").value = "Browser" myvar_0("name").value= ".*" 'Setting property collection object for Page Set myvar_1 = Description.Create myvar_1("class").value = "Page" myvar_1("name").value= ".*" 'Setting property collection object for Text box Set myvar_2 = Description.Create myvar_2("class").value = "WebEdit" myvar_2("name").value= ".*" 'Setting property collection object for Button Set myvar_3 = Description.Create myvar_3("class").value = "WebButton" myvar_2("name").value= ".*" SystemUtil.Run "C:\Program Files\Internet Explorer\iexplore.exe" Browser("myvar_0").Page("myvar_1").WebEdit("myvar_2").Set ("hello how are you ?") Browser("myvar_0").Page("myvar_1").WebButton ("myvar_3").Click Browser("myvar_0").Page("myvar_1").Sync Browser("myvar_0").Close As our application is a Web based application, I was planning to make a few changes in regards to the object names, but unfortunately I am getting the above mentioned error. Could anyone please advice me, whether it could anything to do with the run setting or anything else.I am getting the same error even while implementing on our Sample Application - Mercury Tours website. I would be grateful to anybody who can solve my problem !!

1 Answers  






what are pretesting activities

0 Answers  


Hi Guys...I just started working with QTP now.The frame work they use hear is Write all the functions in function libraries and pass data using data dictionary either from data table or excel .I kind of understood evrthing but one thing I need to know is How do they recognize objects .Do they use object spy and recognize objects or record them ..Does soemone have any idea how they generally do this is such kind of framework

0 Answers  


Hi could some one explan what is the use of the function Defination generator, And how to use the function defination generator.. Explan with the example..

0 Answers  


An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?

0 Answers  


Differentiate the two Object Repository Types of QTP.

5 Answers  


Hi all, I am using windows vista, I am in the process of learning QTP. When ever I try to work with insert mode in flight application , i am getting the error of 'Operation must use an update table query, fractional truncation(null) error. Can anyone help me regarding this?

0 Answers  


What are the file extensions for per-action, shared object repository files and what is the extension for library files?

9 Answers   Semantic Space,


Categories