Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Webedit Issue
#6
Not Solved
Hi Subha,

Good Morning!

Below are the steps that you have to perform inorder to achieve your goa.

Code:
'Get the number of active rows from QTP Global sheet
Dim intRowCount : intRowCount = DataTable.GetRowCount

'Now you have to loop through all the rows in the Global Sheet
Dim intRowNum,strCustomerName
For intRowNum = 1 to intRowCount
  'Set the current row in the global sheet
   DataTable.SetCurrentRow intRowNum
  'get the current row value
   strCustomerName = DataTable("CustomerName",dtGlobalSheet)
  'Now set the customer name
  Browser("BR").Page("PG").WebEdit("CustomerName").Set strCustomerName
  'Click on Add Customer Button
  Browser("BR").Page("PG").WebButton("AddCustomer").Click
  'Check for the error message
   If Window("ErrMsgBox").Exist Then
       'Close the Error message box.
        Window("ErrMsgBox").WinButton("OK").Click
        'write the infomation that the customer already exist.
    Else
       'write the infomation that the customer added successfully.
        Exit For
   End If
Next
Please let me know if you need any further info.

@Ankesh : The only thing that I want to bring to your notice is as we are closing the error message window, I don't understand how the Do loop will works here and more over we have to loop till we are able to enter the info successfully with the number of rows available.
Thanks,
SUpputuri
Reply


Messages In This Thread
Webedit Issue - by Subha - 11-18-2011, 10:47 AM
RE: Webedit Issue - by vinod123 - 11-18-2011, 12:08 PM
RE: Webedit Issue - by v.swaminathan - 11-18-2011, 12:40 PM
RE: Webedit Issue - by Subha - 11-18-2011, 04:17 PM
RE: Webedit Issue - by Ankesh - 11-18-2011, 08:03 PM
RE: Webedit Issue - by supputuri - 11-18-2011, 08:40 PM
RE: Webedit Issue - by Subha - 11-22-2011, 05:19 PM
RE: Webedit Issue - by Gajre - 11-22-2011, 06:52 PM

Forum Jump:


Users browsing this thread: 3 Guest(s)