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
what is the hierarchy to use properties in descriptive programming
After executing the script in qtp suppose i found some script execute successfully and found some error.So how to report the status for both (i.e pass and fail report)in test director. For "fail" We use "defect tab" in testdirector. But for "pass" how to report it to TL.what is the process plz anybody ans
Mention the different actions types of qtp.
What is Unicode Compatibility?
What is reusable action?
what is review
how to test Web application using QTP software
How to replay a script in qtp?
HOW AUTOMATE TEST SCRIPT ? what time it will do? after gneration of basic script or Any , Plz explain detailed?
what r the main attributes of test automation?
How to delete an object from the object repository?
Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..
Subj: realtime example of Database check point, Can any one please detail on how the Database check point is utilized/implemented in a real time project. I already know how to make one by creating DSN/ODBC and writing the required query manually and other steps...I wanted the actual concept of implementation...couple of live examples will be highly appreciated. Thank you in advance
Is qtp supports uni-code?
What is text check point and text area check point?