Write Descriptiv prg 4 login
logn....txt bx
password---txt bx
ok---btn

Answers were Sorted based on User's Feedback



Write Descriptiv prg 4 login logn....txt bx password---txt bx ok---btn..

Answer / suresh.testing

In order to develop this script we should know the test
object descriptive properties & values (By using objectspy)

Ex:Static Descriptive program for login page(Banking
application)


Browser("name:=usRanfordbank").Page("title:=Ranfordbank").WebEdit("html
id:=txtuid").Set "Admin"

Browser("name:=usRanfordbank").Page("title:=Ranfordbank").WebEdit("html
id:=txtpwd").Set "suresh"

Browser("name:=usRanfordbank").Page("title:=Ranfordbank").Image("html
id:=login").Click

------------------------------------------------------------Ex:
Dynamic Descriptive program for login page (banking application

set br=description.create
br("name").value="usRanfordbank"

set pg=description.create
pg("title").value="usRanfordbank"

set uid=description.create
uid("html id").value="txtuid"

set pwd=description.create
pwd("html id").value="txtpwd"

set img=description.create
img("html id").value="login"

Browser(br).Page(pg).WebEdit(uid).Set "Admin"

Browser(br).Page(pg).WebEdit(pwd).Set "suresh"

Browser(br).Page(pg).Image(img).Click

Is This Answer Correct ?    9 Yes 1 No

Write Descriptiv prg 4 login logn....txt bx password---txt bx ok---btn..

Answer / sirisha

//Dynamic Representation of Descriptive progrmming for Gmail
Login Page//

Dim ObjBr,ObjPg,ObjLogin,ObjPword,ObjOk
Set ObjBr=description.create
ObjBr("name").Value="Gmail:Email from Google"
Set ObjPg=Description.create
ObjPg("Title").value="Gmail:Email from Google"
Set Objlogin=Description.create
objlogin("name").Value="Email"
Set ObjPword=Description.create
ObjPword("name").value="Password"
Set ObjOk=Description.create
ObjOk("name").value="Ok"
Browser(Objbr).Page(ObjPg).WebEdit(ObjLogin).Set"Sireesha"
Browser(Objbr).Page(ObjPg).WebEdit(ObjPword).Set "myname123"
Browser(Objbr).Page(ObjPg).WebButton(ObjOk).Click

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

How to associate function library at a run time?

0 Answers  


What are the benefits of quick test pro(qtp)?

0 Answers  


how can i use text check point in descriptive programming. or else is there any way to compare the text in the application and the text in data table.

2 Answers  


Hi,will U Please Provide me details certification for QTP &QC and also please provide me the Material also. Send to mail:jjaanu2mail@gmail.com

0 Answers  


What is Regular Expressions?

2 Answers  






I want to do QTP Certification what is the pattern of Question paper.

0 Answers  


What does SPLIT and JOIN commands do in Vbscript?

6 Answers   Ordain Solutions, UBC,


Tell me about your project? please help me how to tell about insurance project

0 Answers   Cap Gemini,


What is the Command used to start the QTP

0 Answers   HCL,


how can I read text in browser and export the same into text file?

5 Answers   HP,


how to call multiple scripts in QTP at a time

3 Answers   IBM,


what are recovery management techiniques?

2 Answers   BirlaSoft, GL Noble Denton,


Categories