Ask a Question

VB Runtime Error with The Case of the Method Name When Using ScriptExtension

kkc
Occasional Contributor

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?




8 REPLIES 8
HKosova
SmartBear Alumni (Retired)

Hi Kevin,



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. ⬇️⬇️⬇️
kkc
Occasional Contributor

Yes, but after I have added Keyword "Call", the same error still exists.
kkc
Occasional Contributor

The error still exist. I need help.
TanyaYatskovska
SmartBear Alumni (Retired)

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.


 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



kkc
Occasional Contributor

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.



TanyaYatskovska
SmartBear Alumni (Retired)

Hi Kevin,

 


Can you post here the RuntimeObject node from the Description.xml file where you create the method?


 

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



kkc
Occasional Contributor


<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>


 

TanyaYatskovska
SmartBear Alumni (Retired)

Hi Kevin,

 


The object description looks good. Could you please contact our TestComplete Support team to investigate this situation?

---------
Tanya Yatskovskaya
SmartBear Community and Education Manager



cancel
Showing results for 
Search instead for 
Did you mean: