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
Hi, My name is kishan. I have good Conceptual Knowledge on QTP. In order to Boost up my Confidence Level, I want to do a Project oriented Training only on QTP in Hyderabad. Kindly Let me know which is the Best QTP Project Training Institute in Hyderabad. Thanks in Advance kishan
What is smart identification in QTP?
What are the methods used in UFT to handle exceptions or run-time errors?
How will you check that your test cases covered all the requirements?
How is UFT 11.5 version different from UFT 12.0?
How to find operating system information using the qtp script?
Explain measuring transaction.
Why do we use "Text checkpoint" If we can make use of it in "standard checkpoint" ?
How many add-ins comes by default with quicktest professional (qtp)?
Can anybody post some real time scenario in qtp? please its very urgent.
How does QTP identify an object?
tell me abt a time when u had to go above &beyind the call of duty to get the job done
What is the descriptive programming?
How to customize checkpoints with parameters?
What are the different properties of an web object