Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting multiple errors
#1
Not Solved
I am trying to work on someone else Script. its throwing various errors for me .
I am sharing the code below and line number 486 throwing all types of error.

1. wrong argument
2. objects cannot find
3. type mismatch

please help

Code:
Function PC_CreatePLan (headerData,ctrlCount)


   Dim PlanHeaderDataCtrl()
   Dim PlanHeaderDataCount

    Print "Plan Header Data"

   For i = 0 To ctrlCount-1
    
       Print headerData(i)

   Next

' msgbox ctrlCount

   ReDim PlanHeaderDataCtrl(6)
   PlanHeaderDataCtrl(0) = "name:=ctrl_marketSegment"
   PlanHeaderDataCtrl(1) = "name:=ctrl_lob"
   PlanHeaderDataCtrl(2) = "name:=ctrl_product"
   PlanHeaderDataCtrl(3) = "name:=ctrl_planDesign"
   PlanHeaderDataCtrl(4) = "name:=ctrl_funding"
   'PlanHeaderDataCtrl(5) = "name:=ctrl_claimSystem" ' Changed as per CR183: NASCO now gets disabled, so dont need to  select it
   PlanHeaderDataCtrl(5) = "name:=ctrl_benefitPeriod"

    PlanHeaderDataCount = Ubound(PlanHeaderDataCtrl)
  
   Set PCPage = Browser("Horizon Blue Cross Blue").Page("Horizon – Plan Configurator") 'Page("Horizon – Plan Configurator")    

    If PCPage.Exist(10) Then
        Set CreateNewPlan = PCPage.Link("name:=Create New Plan", "html tag:=A")
        If  CreateNewPlan.Exist(3)Then
            CreateNewPlan.Click
            Set EffectiveDate = PCPage.WebEdit("name:=ctrl_effectiveDate", "html tag:=INPUT")
            If EffectiveDate.Exist(20) Then
                EffectiveDate.Set Date
            else
                Reporter.ReportEvent micFail, "Failed to find","Effective Date"
                ErrorCount  = ErrorCount + 1
            End If
            Set NewPlanBrowser = Browser("Horizon Blue Cross Blue").Page("Horizon – Plan Configurator")
            If NewPlanBrowser.Exist(3) Then
                Set PlanDescription = NewPlanBrowser.WebEdit("name:=ctrl_description", "html tag:=INPUT")
                If PlanDescription.Exist(3) Then
                    PlanDescription.Set "New Plan"
                else
                    Reporter.ReportEvent micFail, "Failed to find", "Plan Description Edit box"
                    ErrorCount  = ErrorCount + 1
                End If
                For i= 0TO PlanHeaderDataCount-1
                    Set PlanData = PCPage.WebList(PlanHeaderDataCtrl(i), "html tag:=SELECT")
                    wait(5)
                    If PlanData.Exist(60) Then
                        PlanData.Select  PlanHeaderDataCtrl(i)[/color]
                    else
                        Reporter.ReportEvent micFail, "Failed to find", headerData(i)
                        ErrorCount  = ErrorCount + 1
                    End If
                Next
            else
                Reporter.ReportEvent micFail, "Failed to find","Create New Plan Browser"
                ErrorCount  = ErrorCount + 1
            End If
        else
            Reporter.ReportEvent micFail, "Failed to find","Create New Plan link"
            ErrorCount  = ErrorCount + 1
        End If
    else
        Reporter.ReportEvent micFail, "Failed to find", "Hz BCB Page"
        ErrorCount  = ErrorCount + 1
    End If
    'Destroy the objects
    Set HzBCBBrowser = Nothing
    Set HzBCBPage = Nothing
    Set CreateNewPlan = Nothing
    Set NewPlanBrowser = Nothing
    Set PlanDescription = Nothing
    Set PlanData = Nothing
End Function
''****************************************
Reply
#2
Not Solved
Problem at occuring when I am trying to select (PlanData.Select PlanHeaderDataCtrl(i))

I just tried using SELECT (1).. it works for me for the first item for most of the drop downlist but still getting object now find for two more . and How can I not hardcode the value here ? I want to loop through all
Reply
#3
Not Solved
Sorry for my ignorance, I dint had a look on the whole script, It will help if you can please point out the line number 486 and what exactly is going on into this script.

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting run time errors on the screenshots while recording with QTP Radmila Kukolj 2 3,945 12-14-2011, 04:00 AM
Last Post: Radmila Kukolj
  how to handle errors while running test batch script sureshkumar 0 2,094 11-11-2011, 04:38 PM
Last Post: sureshkumar
  Syntax Errors estherindu 1 7,698 11-20-2009, 05:10 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)