What is descriptive programming (Programmatic Desc

2019-02-18 12:12发布

What is descriptive programming in QTP?

标签: qtp hp-uft
16条回答
Emotional °昔
2楼-- · 2019-02-18 12:49

Descriptive programming is used when we want to perform an operation on an object that is not stored in the object repository. This way QTP won’t search for the object properties in the Object Repository, but will take it from the statement.

查看更多
仙女界的扛把子
3楼-- · 2019-02-18 12:49

What I can say about descriptive Programming is We use Descriptive Programming when we don't want to use Object Repository. Many people said they used descriptive Programming in agile development mode, in which they start creating automation scripts while application was still in development (in agile mode).

We use descriptive programming, when some objects are dynamically changes object properties and with given set of assertive properties it is difficult to identify object,without compromising script performance.

查看更多
神经病院院长
4楼-- · 2019-02-18 12:49

"Descriptive Programming" is a misnomer.

It's used, very misleadingly, as a synonym for 'Dynamic Object Recognition'.

查看更多
劫难
5楼-- · 2019-02-18 12:50

Aside from all the repetition above, I would say that it's the best and most lightweight way to work with QTP, vbscript is the easiest of languages and even considering that, you are only going to be using a small portion of it.

Also re. descriptive programming, there is static descriptive programming, and Dynamic descriptive. Static is creating a variable for each object you want to identify/interact with (ie. dim myBUTTON ) and then giving descriptions of that actual button to the variable.

It's fine and functional, but as Artem pointed out above, the Dynamic version (which he shows you in perfect code) is far more reuseable and friendly and better looking in terms of keeping your code tidier. You make one description object, and continuously redefine6 it for the various needs you have, so (using Artems naming convention) oDesc can become a button that you click, a link that you click, and you can keep redefining it as you go down your code (by giving the same properties/values to that object). It's tidier, and you don't have a million variable names flying all over the place so it's clearer. Dynamic descriptive programming ! There's some fine-aspects to it and trouble shooting depending on which values you pass to your object, so feel free to contact me anytime, Y.

查看更多
戒情不戒烟
6楼-- · 2019-02-18 12:53

The Description of objects like properties and values that we are specifying directly in the test script is called descriptive program Mainly we can use descriptive program without using object repository.

查看更多
淡お忘
7楼-- · 2019-02-18 12:55

descriptive programming is writing qtp scpriting without any object repository

查看更多
登录 后发表回答