What is descriptive programming (program description) in QTP

What is descriptive programming in QTP?

+3
source share
16 answers

Creating a test without using an object repository is called descriptive programming because you describe objects as part of a script.

eg.

Browser("title:=Google").Page("title:=Google").Link("text:=Advanced Search").Click

Pay attention to :=the names of test objects, this is not an emoticon, it means that the property titlematters Google(like a regular expression).

You can also use the object Descriptionthrough Description.Create.

You can see more details here .

+8
source

qtp scpriting -

+2

, , .

Browser("Browser").Page("Page").WebEdit("Name:=textbox_name","html tag:=INPUT").set "My New value"




http://www.learnqtp.com/descriptive-programming-simplified/

+2

, - > QTP , . - > . - > , -. , Google yahoo, ,

 1.    script . , .    ( "micClass: =....." ) Page ( "micClass: =..." ).. Link ( "micClass: =..." )

Note: We can start Descriptive programming at any time, but once started we can not use Object Repository till the line is finished.
  • , . . objTest = . objTest ( "micClass" ). = "" objTest ( "name" ). value = " "

Dheeraj

Mindfire Solutions,

+1

, , script, .

0

, , . , QTP , .

0

( "title: = Google" ). ( "title: = Google" ). ( ": = " ). , . , 1 , .

- Description:

Dim oDesc        'Description Object
Dim colObject    'Object Collection

Set oDesc = Description.Create
oDesc( "micclass" ).value = "Link"
oDesc( "text" ).value = ".*ma.*"  'Images
oDesc( "text" ).regularExpression = False

Set colObject = Browser( "Google").Page("Google").ChildObjects( oDesc )

, , .

0

? , . , , , ( ).

, script.

0

, qtp.It [ โ†’ ]. . : -

0

, E.g. HTML ID, ... , , script, ()

0

, , QTP, vbscript - , , .

re. , . Static , / (.. Dim myBUTTON), .

, , , ( ) . , ( Artems) oDesc , , , , , ( / ). , , , . ! , , , Y.

0

, .

Browser("title:=Google").Page("title:=Google").Link("text:=Advanced Search").Click

-

Browser("Google").Page("Google").Link("Advanced Search").Click

0

, (, ), (, Google), , .

- . , , , , , .

Both have pros and cons. Let's say if your phone is dead or not on the network, Google maps (object repository) will no longer work for you. You have to go with your own path.

0
source

"Descriptive programming" is incorrect.

He used it very erroneously, as a synonym for Dynamic Object Recognition.

-3
source

Writing Descriptive Level Programming for qtp

-4
source

Source: https://habr.com/ru/post/1737680/


All Articles