Please Example programms on vbscript 1)writing functions
and calling functions

Answers were Sorted based on User's Feedback



Please Example programms on vbscript 1)writing functions and calling functions..

Answer / badri

'writing function


function example()

msgbox "This is example for writing funtion"
end function


'calling the above function--just we write the function name

example()

Is This Answer Correct ?    4 Yes 0 No

Please Example programms on vbscript 1)writing functions and calling functions..

Answer / cil testing team(jaipalreddy)

Public function login(x,y)
'record or write descriptive script for repeatable
operation
here xand y are arguements
End Function
'save this function in function library or copy them in
notepad or wordpad and save them with .vbs exension

While calling this function in test
call like this in test
login "Mercury","mercury"
then steps->1.File menu->settings->Resources Tab ->here
click + mark to Browse the path
->Click apply->Click Ok

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More VB Script Interview Questions

write a vb script to calculate factorial of a number?

5 Answers  


What variable can you use to share info across the whole application for one user?

2 Answers  


What is the difference between Javascript & Vbscript?

2 Answers  


What is the use of "Option Explicit"?

2 Answers  


I wrote the vbscript code on notepad i was geeting run time error "object required line 1" my code is set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signin("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Setsec ure.Crypt.Encrypt("entr password") browser("gmail").page("gmail").WebButton("siginobj").click pls tell me whats wrong

1 Answers  






What is the scope of a constant declared using public?

0 Answers  


Write a VB Script to count blank Lines in a notepad

2 Answers   IBM,


In QTP how to insert a data base check point for web based application and simultaneous link to code in expert veiw. hw to retrieve a data(single coulumn from server) that matches with inserted value manually or exported from excel sheet.

2 Answers  


Explain the scope of the variables using dim, public, and private keywords respectively.

0 Answers  


accept a string & display whether a is present or not

1 Answers  


Hello All, In QTP 9.2 for Mozilla Firefox, there is webelement in my application, I tried to click on that using decsriptive programming, but it does not work. and for this i tried this code too: Set obj = CreateObject ("Mercury.DeviceReplay") absx = Browser("").Page("").WebElement(".").GetROProperty ("abs_x") absy = Browser("").Page("").WebElement(".").GetROProperty ("abs_y") obj.MouseMove absx, absy obj.MouseClick absx, absy, 0 But it is not clicked. Can anyone help me out for this problem. Thnx in Advance

1 Answers  


can u test the application without add-in?

1 Answers  


Categories