I need to know how to Automate a Username and Password for
a Web-based product? I'm scripting 3 different types of
surveys but each Survey requires a Username and Password
which is always the same. I can I do this using QTP?

Answer Posted / baba fakruddin

go for Functions or Actions to reuse where ever u want.

eg. ObjectHierarchy.winedit("User Name").Set "Fakruddin"
ObjectHierarchy.Winedit("Password").Setsecure "97841234"
ObjectHierarchy.Winbutton("Login").Click

Save this in one Action as Reusable action and use where
ever u want. OR

Save this in Notepad and save with .vbs extension then go
for resources tab and add by showing particular path of
that function

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is qtpro? What is quick test pro?

558


How to add object to object repository in qtp9.0 Suppose for brower yahoo home page

1427


What are the different types of qtp test assets and their extensions?

595


How do you script a nested loop in QTP? I am showing a snipet of my code. Any suggestions to help me get this to work would be great appreciated! STEP A - Customer Number: No loop - ISBN: Loop STEP B - Customer Number: Loop - ISBN: Nested Loop Here is the code I am using now. I am using i for the loop and j for the nested loop in STEP B of my script. =========================================== 'CREATE AN ADDITIONAL CUSTOMER Dim myNum, RowNum, RowCnt2, val2, total, i DataTable.ImportSheet "C:\QOE Data - UAT1.xls" ,"Data" ,"Global" RowCnt2 = DataTable.GetRowCount i = 1 DataTable.SetCurrentRow(i) ' Set row to one Do while Not i > RowCnt2 i=i+1 DataTable.SetNextRow MsgBox Datatable.Value("Customer_Num") Msgbox i Msgbox RowCnt2 If Not i > RowCnt2 then val2=datatable.Value("Customer_Num","Global") OracleFormWindow("Sales Order").SelectMenu "File->New" OracleFormWindow("Sales Order").OracleTabbedRegion("Order Information").OracleTextField("Customer Number").SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Order Information").OracleTextField("Customer Number").Enter val2 End If 'CREATE SECOND ISBN LIST DataTable.ImportSheet "C:\QOE Data - UAT1.xls" ,"Data" ,"Global" Dim j, RowCnt3, val3 RowCnt3 = DataTable.GetRowCount For j = 1 To RowCnt3 DataTable.SetCurrentRow(i) ' datatable.getSheet("DataTable").setNextRow If Trim(DataTable("ISBN",dtGlobalSheet)) = "" Then j = j - 1 Exit For End If Next 'Define ISBN rows If RowCnt3 <> j Then RowCnt3 = j End If 'Loop through ISBN rows For j = 1 To RowCnt3 DataTable.SetCurrentRow(i) val3 = Datatable.Value("ISBN","Global") msgbox j If j = 1 Then OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item").SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item").Enter val3 else If j < 16 Then OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_"&i).SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_"&i).Enter val3 else If RowCnt1 => 16 Then OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_15").SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_15").InvokeSoftkey "DOWN" OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_15").SetFocus OracleFormWindow("Sales Order").OracleTabbedRegion("Line Items").OracleTextField("Ordered Item_15").Enter val3 end if end if End If Next 'EXIT APP msgbox i loop Browser("Browser").Page("Oracle Applications 11i").Sync Browser("Browser").Close ========================================== It isn't working correctly in my nested loop in STEP B (for ISBN). Any ideas?? Thanks! SBsteve

6741


Explain measuring transaction.

586






If I change the property value at runtime is it effect is object repository?

602


What is the extension of QTP local Repository? If it is .mtr then what is .bdb extension stands for?

579


Does quicktest professional (qtp) is unicode compatible?

536


What is the file extension of the code file and object repository file in QTP?

597


can anyone tell me from where i can download qtp demo or crack version

1621


How can you handle exceptions in qtp?

534


What is a checkpoint? How many check points are there in qtp?

528


Explain hybrid framework with advantages and disadvantages?

539


Hi, my requirement is to make a query in SQL using QTP. And i have to get the results of that query and i have to use those results for future testing. I created a driver but i dont know the code for using this Driver. please help me by providing the solution for y requorement

1646


What are the differences between quicktest professional (qtp) and winrunner?

568