Forum Discussion
Looks like timing issue. One best thing is before accessing object properties it should have the exists check like below,
function Test()
{
if(Aliases.Device. TextView("text1").Exists)
{
Log.Message(Aliases.Device. TextView("text1").ControlText());
}
else
{
Log.Error("Object not found");
}
}
- baburajvd7 years agoOccasional Contributor
I accept your suggestion , But if we have 6 similar verification includes in the same function, this pattern of error occurs . Only in the 7th iteration this function will be working as expected. There I don't think wait time is the root cause for this issue.
- shankar_r7 years agoCommunity Hero
It is not about similar functions, It is about the unique object you are trying to get the text value. if you are getting error it might only do to with that object.
Post here some error which you are getting, so that answers can be more clear.
- baburajvd7 years agoOccasional Contributor
Attaching the error log :
com.jacob.com.ComFailException: Invoke of: CallMethod
Source:
Description:
at com.jacob.com.Dispatch.invokev(Native Method)
at com.jacob.com.Dispatch.invokev(Dispatch.java:858)
at com.jacob.com.Dispatch.invoke(Dispatch.java:502)
at com.smartbear.cucumber.TestComplete$TestCompleteRunner.CallMethod(TestComplete.java:246)
at com.smartbear.cucumber.TestComplete.RunRoutine(TestComplete.java:83)
at com.ge.lotus.automation.stepdefinition.NIBP_Steps.iChangeTheThresholdValuesForSystolicHighDiastolicHighAndMapHighBasedOnUnitAndPressOnApplyButton(NIBP_Steps.java:488)
at ✽.And I change the threshold values for 'systolic high' 'Diastolic high' and 'Map high' based on unit mmHg and Press on 'Apply' button(FeatureFileRepo/NIBP.feature:1099)
com.jacob.com.ComFailException: Invoke of: CallMethod
Source:
Description:
at com.jacob.com.Dispatch.invokev(Native Method)
at com.jacob.com.Dispatch.invokev(Dispatch.java:858)
at com.jacob.com.Dispatch.invoke(Dispatch.java:502)
at com.smartbear.cucumber.TestComplete$TestCompleteRunner.CallMethod(TestComplete.java:246)
at com.smartbear.cucumber.TestComplete.RunRoutine(TestComplete.java:83)
at com.ge.lotus.automation.stepdefinition.NIBP_Steps.iChangeTheThresholdValuesForSystolicHighDiastolicHighAndMapHighBasedOnUnitAndPressOnApplyButton(NIBP_Steps.java:488)
at ✽.And I change the threshold values for 'systolic high' 'Diastolic high' and 'Map high' based on unit mmHg and Press on 'Apply' button(FeatureFileRepo/NIBP.feature:1099)
Related Content
- 2 years agoTanIlak
Recent Discussions
- 5 hours agotramuntana
- 2 days agoSlickRick