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

Hi Friends, Can anyone help me out in this one? In QTP, I am using Data Driver and want to parameterise multiple values (say 3 values ) for a field. How can I do it using Data Driver wizard? Plz mention it step-by-step. In the end after doing the needful, on opening the Data Driver window, how can I get number (i.e. 3) in the Parameterised column for that particualr value? Thanks a lot in advance.

1438


What is the meaning Work bench?

1756


What is keyword driven framework?

610


What do you mean by checkpoints in qtp?

554


what is keyword driven testing in qtp?n how is it useful?

1485






What are the automation metrice in your project?

1709


What is active screen?

560


How do you delete unwanted results in qtp?

598


Hi, I'm a beginner in QTP and planning of a certification in QTP, but have no idea about it :P. Could anyone please tell me what certifications that a QTP- beginner can take? What is the fees and the syllabus for the certification? Please reply soon. Thanks Vidhya

1416


is there any addin for remedy user application

1740


What is test object?

691


in qtp 3 sheets is there in data table like global, action1, action2. I want to check the rows and columns in action2. how can check using script?

6310


What are the various types of Actions in UFT?

585


How do you convert manual test cases to automated test cases?

571


Explain object spy in qtp.

579