Can anyone help me how to write the program in scripting language?for eg., if we have a textbox and a submit button then how to write a program to enter a value in textbox and click submit button and which scripting lang will u use?

Showing Answers 1 - 5 of 5 Answers

Hi,

Scripting languages are for providing event handlers

i.e when we perform any action on the window or object we can manage that event and customize the behaviour of the application.

let me tell you as per your requirement..........

you have a textbox, you have a button

when you enter some data in the textbox and press on the button what should happen? you know what should happen right?

you have code for that accordingly..

vbscript/javascript are well known scripting languages for client side validations and most of the web-based applications are using these scripts.

but if you find some solution regarding the script written to hit a button and feed input into the textbox like that stuff ... kindly post it back here

  Was this answer useful?  Yes

ramakrishna

  • Mar 10th, 2006
 

hi,

see.. for different tools we have different scripting languages.

ex for winrunner we use TSL  where as in QTP we'll use vbscript.

tsl script for above scenarios is

edit_set("text box name","data that u want to enter");

button_press("button name");

by

ramakrishna

  Was this answer useful?  Yes

vasavi

  • Dec 20th, 2006
 

Hi ,

In QTP you can write the Vb script as follows....

 suppose it is a browser having one text box with the label name "TEXTBOX" and Button "SUBMIT".... Then we write as

Browser("BrowserName").page("pagename").WebEdit("TEXTBOX").Set "abcd"

Browser("BrowserName").page("pagename").WebButton("SUBMIT").Click

Regards,

Vasavi

  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