Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error while working with Function in QTP script
#1
Not Solved
Hi,

Following function I have preared by saving it in notepad file with .vbs extension.

----------------
Code:
Function Loadtime (a)
    For count = 1 To 999999
    Flag=a
If Flag = False Then
        Wait (1)
    Else
        count = 999999
    End If
Next
End Function
----------------
I have prepared following script by calling above function as follows-

----------------
Code:
URL = Datatable.Value("URL",Global)
User_name = Datatable.Value("User_name",Global)
Password = Datatable.Value("Password",Global)
Users = Datatable.Value("Users",Global)

systemutil.Run "iexplore",URL

'Load Login screen
a = Browser("InSync :: Login").Page("InSync :: Login").Image("topbanner").Exist
Call Loadtime (a)


Browser("InSync :: Login").Page("InSync :: Login").WebEdit("txtUsername").Set User_name
Browser("InSync :: Login").Page("InSync :: Login").WebEdit("txtPassword").Set Password
Browser("InSync :: Login").Page("InSync :: Login").WebButton("Login").Click

Browser("InSync :: Login").Close
----------------


After creating above test, I gone to File - Setting - Resources and clicked on the +(plus appears in green color) symbol and selected .vbs file in which function is described..

While runing script error "Type mismatch: 'Loadtime. Line(10): "Call Loadtime (a)" occurs.

Please let me know what is wrong in my script / function??

Thanks,
Mansi..


Attached Files Image(s)
   
Reply


Messages In This Thread
Error while working with Function in QTP script - by mansis - 09-21-2012, 05:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  need help --- for clicking on function its showing error message umaenc 4 3,895 07-19-2012, 11:03 AM
Last Post: umaenc
  QTP (10.0) not working on windows7 mamtamanu 1 2,975 12-28-2009, 01:19 PM
Last Post: Saket
  Is there any similar function like list_activate_item (WR function) in QTP ranjitavemuri 1 3,064 06-18-2008, 03:09 AM
Last Post: niranjan

Forum Jump:


Users browsing this thread: 1 Guest(s)