How to make an user-defined function reusable?

Showing Answers 1 - 4 of 4 Answers

  • Apr 30th, 2012
 

By encapsulating frequently performed or complex operations which is used several times in the script we can make the user defined functions reusable, SQL statements or scripts become easier to write, understand, and debug with the help of used defined functions.

kranthi

  • Aug 15th, 2012
 

Here is the function:

Code
  1. Function launch()

  2.   bro="C:Program FilesInternet Exploreriexplore.exe"

  3.   url="http://127.0.0.1:1080/WebTours/"

  4.   invokeapplication(bro&" "&url)

  5. End function

  6.  

  7. now log in function:

  8. Function login(byval x, byval y)

  9.         with Browser(home)

  10.                 with .page(home)

  11.                         with .frame(lfrm)

  12.                           .webedit(uid).set x

  13.                           .webedit(pwd).set y

  14.                           .image(signin).click

  15.                         End with

  16.                 End with

  17.         End with

  18. End function

  19.  



here byval x,byval y these are arguments it wil take inputs.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions