Please Example programms on vbscript 1)writing functions
and calling functions
Answers were Sorted based on User's Feedback
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 |
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 |
write a vb script to calculate factorial of a number?
What variable can you use to share info across the whole application for one user?
What is the difference between Javascript & Vbscript?
What is the use of "Option Explicit"?
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
What is the scope of a constant declared using public?
Write a VB Script to count blank Lines in a notepad
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.
Explain the scope of the variables using dim, public, and private keywords respectively.
accept a string & display whether a is present or not
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
can u test the application without add-in?