suppose 3 excel sheets are there * we are trying to check
for login credentials for a page. userid from excel1 ,
password is from excel2 whether the page is opened or not
that checkpoint is result is should be stored in excel
3.... this qus i have faced in IBM technical round...
please tell script for above query

Answer Posted / kishore

Getting User id from Excel 1

Set objxls = createobject("Excel.Application")
objxls.workbooks.open "C:\Documents and
Settings\ranantatmula\Desktop\data.xlsx"//path of the excel
sheet where user id is stored
v1 = objxls.cells(1,1) // where user id is stored in Excel
browser("xxx").page("yyy").webedit("username").set(v1)

Get PWD from excel 2
Set objxls1 = createobject("Excel.Application")
objxls.workbooks.open "C:\Documents and
Settings\ranantatmula\Desktop\data1.xlsx" //path of excel
where pwd is stored
v2 = objxls.cells(1,1) // where PWD id is stored in Excel
browser("xxx").page("yyy").webedit("username").set(v2)


To export the result in Excel 3

Set objxls3 = createobject("Excel.Application")
set objworkbook = objxls3.workbooks.Add


write a condition if page is opened

browser("xx").page("xx").webedit("userid").click
browser("xx").page("xx").webedit("pwd").click
browser("xx").page("xx").webbutton("submit").clcik


If page opens

objxls3.sheet(1).cells(1,1) = "PASS"

else

objxls3.sheet(1).cells(1,1) = "FAIL"

Endif

Is This Answer Correct ?    10 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how you can find length of array in qtp?

601


if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp

23925


Which environments are supported by hp qtp?

598


how can we do the frame work in qtp

1602


What are the different ways to invoke an application using QTP?

647






Explain how qtp identifies objects?

566


What is the process of synchronizing qtp and aut?

568


Differences between text and test area checkpoints?

582


How do know the number of browsers opened?

627


what is the diffrence bw qtp architectute and qtp framework?

1541


Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet 'traffic congestion' problems to be accounted for in testing?

620


Explain step generator in qtp?

647


how to find that tools work well with ur existing system?

1354


what r the verstions from 1st to present (verstions) of mercury tools (like winrunner,QTP,Loadrunner) ? Chandana

1463


Differences between quicktest professional (qtp) and winrunner?

621