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
How to use the object spy in quicktest professional (qtp) 8.0 version?
Are Shared ORs read-only?
Explain types of output values?
Can you list some technologies that support qtp?
in a web page How to check and display a particular word from a paragraph?
Is the qtp course will help to create a virtual object?
What are the main differences of qtp and win runner?
Please provide specific examples of advanced/creative usage of QTP, including how impact & benefits for your project
can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?
What are the different types of recording modes?
What are the differences between qtp and winrunner?
How to Get the Run-time value of an object under that web app under Test to the local data table sheet of that Action?
Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers
what is key word driven frame work ? why it is called like that ? what is the diference between keyword driven and data driven frame work ?
How to save your test using quicktest professional (qtp)?