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

While recording a login window QTP is identifying only parent window,then how can u identify the child objects.

2 Answers   Symphony,


How can we open an Excel sheet through the script

8 Answers   eSymbiosis,


types of output value in details.

4 Answers  


How to parameterize in QTP?

4 Answers  


What are the technologies supported by qtp?

0 Answers  






in which situation u will use recording and in which situation u will used to write script manually

1 Answers  


How to get data from excel sheet to the script? write the script.

6 Answers   Ever, Liquid Hub,


How many types of recording facility are available in quicktest professional?

0 Answers  


How to make Shared object repository in qtp 9.1 and 9.2?

2 Answers  


what is purpose of automation?

3 Answers  


Dear sir, i want to perform a QTP automated testing for mechancial engineering software like msc adams, msc nastran this softwares will help for mechanical engineering design analysis>> i know oad runner win runner, test director, QTp>> but i dont know how to use for automation

0 Answers  


What is the difference between Keyword Driven test and Data Driven test?

0 Answers  


Categories