用或不用HTML DOM的原因

适合HTML DOM的原因:

  1.QTP only provides access to radio buttons through the WebRadioGroup rather than providing access to individual elements.

  2.QTP provides no way to access webpage style sheets to find out any CSS inplemented for it

  3.Normal QTP operations are not equipped to accomplish tasks.Examples include:

    1).Dynamically traversing upwards in object hierarchy (unless all required parent objects are present in the OR)

    2).When operations are not supported by QTP, e,g. retrieving the session cookie

  4.Performance is of importance

  5.Interacting with an object's style and currentStyle objects

  6.The application fails to respond to normal QTP operations

 

不适合HTML DOM的情况:

  1.When a QTP test object is working as expected.

  2.When there is no significant performance overhead.

  3.When your script is used by other automation developers with little knowledge of HTML DOM.

posted @ 2013-06-21 10:02  dushuai  阅读(148)  评论(0编辑  收藏  举报