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



I wrote the vbscript code on notepad i was geeting run time error "object required line 1&quo..

Answer / niranjani

Hi,

You have created signinobj but while describing you have given signin, it should be signinobj

set signinobj=Descriptive.Create()
signin("name").value="sigin"

fine below the updated code

set signinobj=Descriptive.Create()
signinobj("name").value="sigin"

i hope it should work
all the best

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More VB Script Interview Questions

Can we create Crystal Report object in QTP?If yes then what it is and what are its various properties?

0 Answers  


Which date function is used in the vbscript language to find the difference between the 2 dates?

0 Answers  


write a vb script to display calculator using case statement?

1 Answers  


how to retrive the tooltip by using descriptive programming in qtp?

3 Answers   iGate,


hai all.iam chandu..please let me know how to test a link in QTP when it is changing at run time..and what property we should take while we r using descriptive programming for a link..

6 Answers  






Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?

0 Answers   Microsoft,


sunday is sunday monday tuesday wendesday sunday thursday friday saturday sunday sunday how to count no of sunday in the text file from vb? Answer me asap

4 Answers  


How to find the font in qtp. Scenario:After entering the username and passwd you will be navigate into the "welcome:Username" page.Now I want to extarct font for this message.

0 Answers   GE, iGate,


Mention how to assign a date value to a variable?

0 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  


write a function to read the items from combobox of Flight reservation & save in excel (QTP)??

0 Answers  


How are values assigned to string type and numeric type variables?

0 Answers  


Categories