Micro Focus QTP (UFT) Forums
Syntex error - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Syntex error (/Thread-Syntex-error)



Syntex error - ramanaq - 05-16-2014

Hi,
while run the below script system showing error message
Code:
Systemutil.Run"C:\Program Files\HP\QuickTest Professional\samples\flight\app\flight4a.exe"
'Object Description Constants
Public Const Login_Dialog="text:=login"
   Set login_Edit_Agent Name=CreateObject Description("nativeclass:=Edit,attached text:=Agent Name")
   Set login_Edit_Password=CreateObject Description("nativeclass:=Edit,attached text:=Password")
   Set login_Btn_Ok=CreateObject Description("nativeclass:=Button,,attached text:=Ok")

Error message:The test run cannot continue due to a syntax error.

Expected '='

Code:
Line (1): "Set login_Edit_Agent Name=CreateObject Description("nativeclass:=Edit,attached text:=Agent Name")".


please help me ,i am beginner in qtp


RE: Syntex error - supputuri - 05-16-2014

'CreateObject Description ' is this a function call? If not then please check the Description.create option in QTP helper file which will give you the required information.