Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Fail to run" when calling from another Action
#1
Not Solved
Hi everybody

I am having troubles when executing the following code from UFT. The code is included in a separate action which has a local data table. When I run the action separately, everything is working perfectly and the test passes. If I call the action from another action, I get the following error: "Fail to run the test due to un unknown error".

Here is the code I am using:

Code:
ExistsInSection DataTable("BasicSettings", dtLocalSheet), "BasicSettings"

Code:
Function ExistsInSection(ByVal columnName, ByVal section)
    
    If columnName<>"" Then
        
        CheckCondition Exists(oPage.WebElement(columnName)), "test", "test"
        CheckCondition StrComp (oPage.WebElement(columnName).GetTOProperty("section"), section)=0, "test", "test"
        CheckCondition Exists(oPage.WebCheckbox(ColumnName)), "test", "test"
        CheckCondition StrComp (oPage.WebCheckbox(columnName).GetTOProperty("section"), section)=0, "test", "test"
    
    End If
    
End Function

Code:
Public Sub CheckCondition(ByVal p_blnCheckCondition, ByVal p_strReportStepName, ByVal p_strReportDetails)
    If p_blnCheckCondition Then
        ReportSuccess p_strReportStepName, Format1("SUCCESS: {0}", p_strReportDetails)
    Else
        AbortTest p_strReportStepName, Format1("FAILED: {0}", p_strReportDetails)
    End If
End Sub

Note: The code includes some functions for String format and Exists function returns a Boolean if the obj exists. These functions are working. The objects in OR are having an added property called "section".

Please let me know if you have an idea about what I am doing wrong...
Thank you!
Reply


Messages In This Thread
"Fail to run" when calling from another Action - by crissbbbm - 08-27-2013, 02:25 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)