3

I am testing a highly javascript based application on Internet Explorer 8.0 with UFT 11.50. I would like to know how UFT implements the "Click" method under the hood when using the Web Add In. Does UFT send a windows mouse event? Does it fire an event (onclick, onmousedown, onmouseup)? I have been seeing some mixed results with my application.

4

1 回答 1

3

它可以执行任一操作,默认情况下 UFT 使用 DOM 事件重播,但您可以将重播类型更改为设备,在这种情况下,它会查询 HTML 元素的位置并模拟鼠标单击该位置。

回放模式由Tools->Ooptions->Web->Advanced->RunSettings或在脚本中通过以下方式控制:

Setting.WebPackage("ReplayType") = 2 ''# Changes to device mode
Setting.WebPackage("ReplayType") = 1 ''# Changes to event mode

请注意,在事件模式下,UFT 不仅发送click,它还发送通常由应用程序使用的其他事件(例如和) focus,除非WebPackage设置中的注册表值ReplayOnlyClick设置为。mousedownmouseup1

于 2013-07-17T14:55:34.417 回答