VB Runtime Error with The Case of the Method Name When Using ScriptExtension
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2014
06:41 PM
07-13-2014
06:41 PM
VB Runtime Error with The Case of the Method Name When Using ScriptExtension
I currently met a problem using ScriptExtension in TestComplete 9.31.3889.7. When I tried to call my method defined in ScriptExtension, there is always a VB runtion error.
My code is as follows:
=========================================
Sub VerifyMaintenanceScreen(ByVal strDriverName)
Call Log.AppendFolder("Verify the data in the Maintenance Screen.")
'Verify the fields
HTML.TextBox.verifyvalue(id, value)
Call Log.PopLogFolder
End Sub
=========================================
The runtime error is as follows:
=========================================
Object doesn't support this property or method: 'HTML.TextBox.VerifyValue'
Error location:
Unit: "BaseModule\BaseModule\Script\BASE_GeneralizedCodeGroup"
Line: 182 Column: 9.
=========================================
I didn't quite understand why I called method "HTML.TextBox.verifyvalue" but the TestComplete considered the method I called as 'HTML.TextBox.VerifyValue'.
Is this a bug or something?
My code is as follows:
=========================================
Sub VerifyMaintenanceScreen(ByVal strDriverName)
Call Log.AppendFolder("Verify the data in the Maintenance Screen.")
'Verify the fields
HTML.TextBox.verifyvalue(id, value)
Call Log.PopLogFolder
End Sub
=========================================
The runtime error is as follows:
=========================================
Object doesn't support this property or method: 'HTML.TextBox.VerifyValue'
Error location:
Unit: "BaseModule\BaseModule\Script\BASE_GeneralizedCodeGroup"
Line: 182 Column: 9.
=========================================
I didn't quite understand why I called method "HTML.TextBox.verifyvalue" but the TestComplete considered the method I called as 'HTML.TextBox.VerifyValue'.
Is this a bug or something?
8 REPLIES 8
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2014
07:16 PM
07-13-2014
07:16 PM
Hi Kevin,
You're missing Call before the verifyvalue method call:
Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
You're missing Call before the verifyvalue method call:
If you omit Call, you must also drop the parentheses around the argument list:
Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2014
06:46 PM
07-14-2014
06:46 PM
Yes, but after I have added Keyword "Call", the same error still exists.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2014
05:22 PM
07-15-2014
05:22 PM
The error still exist. I need help.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2014
07:37 PM
07-15-2014
07:37 PM
Hi Kevin,
Is HTML the name of the runtime object in your script extension? Make sure that all properties and methods of your object are properly created in the Description.xml file. Refer to the "Structure of the Description File" article for details.
Is HTML the name of the runtime object in your script extension? Make sure that all properties and methods of your object are properly created in the Description.xml file. Refer to the "Structure of the Description File" article for details.
---------
Tanya Yatskovskaya
SmartBear Community and Education Manager
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2014
04:38 PM
07-16-2014
04:38 PM
Maybe I didn't explain the issue clearly. The problem is the method I define in ScriptExtension is "verifyvalue" (all characters are in lower case) and the method I called is "verifyvalue" (lower case as well). But the TestComplete considered that I call a method "VerifyValue" (two "v" are both in upper case), and think the method I called didn't exist. But actually, I didn't call "VerifyValue" (upper case) at all.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2014
06:18 PM
07-16-2014
06:18 PM
Hi Kevin,
Can you post here the RuntimeObject node from the Description.xml file where you create the method?
Can you post here the RuntimeObject node from the Description.xml file where you create the method?
---------
Tanya Yatskovskaya
SmartBear Community and Education Manager
Tanya Yatskovskaya
SmartBear Community and Education Manager
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2014
02:24 PM
07-17-2014
02:24 PM
<RuntimeObject Name="TextBox" Namespace="HTML">
<Method Name="FillTextBox" Routine="FillTextBox">
Enter a value in the specified textbox.
</Method>
<Method Name="LookupValue" Routine="LookupValue">
Click on lookup button and select an item based on value.
</Method>
<Method Name="verifyTextBoxState" Routine="verifyTextBoxState">
Verify if a Textbox is enabled/disabled. strState: Enabled/Disabled
</Method>
<Method Name="TabFromTextBox" Routine="TabFromTextBox">
Tab from the specified textbox
</Method>
<Method Name="ReadValueFromTextBox" Routine="ReadValueFromTextBox">
Read a value from the text box and store it in a project variable with the specified name
</Method>
<Method Name="verifyvalue" Routine="verifyvalue">
Verify a value in the Textbox
</Method>
</RuntimeObject>
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2014
11:24 PM
07-22-2014
11:24 PM
Hi Kevin,
The object description looks good. Could you please contact our TestComplete Support team to investigate this situation?
The object description looks good. Could you please contact our TestComplete Support team to investigate this situation?
---------
Tanya Yatskovskaya
SmartBear Community and Education Manager
Tanya Yatskovskaya
SmartBear Community and Education Manager
