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



suppose 3 excel sheets are there * we are trying to check for login credentials for a page. userid..

Answer / 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

More QTP Interview Questions

Where we write the FUNCTIONS, in Expert view (or) in any textfiles like Notepad and save it in Library functions folder? How to cal that functions to our script? How to save that functions to Function generator?

3 Answers  


how do u plan test automation?

0 Answers  


How to handle dynamic objects in quicktest professional?

0 Answers  


How to Synchronize the Browser at Field level? For example if you put Browser.sync(), its waiting upto for that Browser sync only. It should wait total Browser get upload with fields.

3 Answers   IBM, TCS,


How to create basic scripts from a manual test case in QTP?

1 Answers  






your doing one project testing then how u know itis wheather web based application or windows based application?

2 Answers  


difference between multiple parameterization and data driven wizard in QTP?

1 Answers  


What is the difference between keyword driven frameworkd and Modularisation framework?(Chandana)

5 Answers   Wipro,


can u explain about QTP Frameworks? what are the framework types are available? and How to set or create frame work for a application? Explain briefly?(Also give me one example)

1 Answers  


i did B.Tech cse and i secured 76%. instead of siting at home ... i would like to do some course. can u suggest me in this.

1 Answers  


Expalin Text/Text Area Checkpoint

1 Answers   Crea,


what are the environment variables,how do you use them. give an example.

3 Answers   Polaris,


Categories