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

How do you check ticket cost and ticket number in flight application?

0 Answers  


Waht is Test Report , What it consists?

2 Answers  


What are the features and benefits of Quick Test Pro(QTP)?

0 Answers   Crea,


How to match two doc files using qtp requirment is:- each and every single word of a doc file should be matched with the another doc file. can someone send me the code.

1 Answers  


How are actions and functions different in QTP?

0 Answers  






Deal All, Recently i face one interview question in one company. str="test12@#3456" In This i want to print like special character and numeric ,word in one script please tell me how to write the code for this Thanks Balaji

1 Answers  


keyword driven framework having how many folders? explain folders in detail?

1 Answers  


How do you test the different ads displayed in the Inbox home page of Yahoo. Once u login Yahoo mail, in inbox page there will a banner, where different ads are scrolling, how do you test that using qtp?

2 Answers  


Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.

0 Answers  


actuall wat my doubt is:while doin regression testin we enter all +ve & -ve data....system has to accept +ve and reject -ve data.in such case we get a popup window sayin that wrong entry...now i wan to overcome this popup window..how do i go further....plz explain.i tried thru rec.scenario but of no use.

1 Answers  


Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak

0 Answers  


How to get Traceability matrix from TD?

0 Answers  


Categories