How to write Descriptive programming in .VBS file
i wrote this code but it is giving error..
Dim qtApp
set qtApp=createobject("QuickTest.Application")
qtApp.Launch
qtApp.Visible=True

Set objIE = CreateObject("InternetExplorer.Application")
objIE.visible = True
objIE.Navigate "www.gmail.com"

browser("title:=gmail").title("title:=gmail")

Answer Posted / shashank shekhar raj

Hai Quick-test Professional,

For your kind information i want to say you that VB Script
does not support Descriptive programming

But Descriptive programming full-support the VB Script

i mean that if you write this code in QTP which support both
Descriptive programming and VB Script you are sucessfull

but if you write this code in .vbs File which is pure VB
Script then you got the ERROR.
You just observe that .VBS File only shown error on that
line of code in which you write DP Proggraming

browser("title:=gmail").title("title:=gmail")

you got ERROR only in this line because you was not use VB
Script here you was only use DP in this line

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to pass argument by reference to a function in vbscript?

540


PLz send me the VB scripts which is having more examples my email id : hareen_11@yahoo.com

1667


How will you format a number in percetage format in vbscript?

593


what is the difference between modular and data and keyword driven framework

1745


What are the advantages of vbscript?

648






How to access array data?

545


What is the purpose of on error resume next statement?

581


How to make professional test report using vbscript code in UFT, which gives us complete analysis of the test.

2500


how to increasing the numbers in a given text box please write a vb script

1706


What is the use of the instr function?

585


How should i Create Email invite with server-side Coding?

1606


Mention what is the use of option explicit in vbscript?

551


1.I want to establish connection with excel and also want to fetch the data using SQL queries. 2.the code should be written in such a way that in future if I want to migrate from excel to MS excess database , then there should be minimal changes.

1523


HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.

2066


i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click

1421