UFT 12.01 “.click” and “FireEvent” doesn't work

青春壹個敷衍的年華 提交于 2019-12-08 04:30:37

问题


I had an already successful running code but after some application maintenance/deployment. The same code doesn't work. Now the problem is that the same code works on different system.

I have a code - Browser("").Page("").WebElement("").click- which used to run earlier but now it doesn't. The properties have remained the same and highlights when highlighted, while executing it goes to the application but doesn't click. The same is the case for FireEvent.

I have tried different methods to work around it like - using ChildObjects and using Replay Type as Mouse instead of Event.

It works with Replay Type but UFT crashes when Replay Type is changed back to Event.

Anyway I am curious to know, how the same code works on different machine without having to do any workaround and it doesn't on mine. Both the system run UFT 12.01, one having IE 11 (where it doesn't work), second having IE 8 (Where it works).

Does it have to with IE version ? As I read somewhere that these events are related to the DOM.

Appreciate your thoughts/Inputs here


回答1:


Try something like:

'Runs mouse operations using the mouse
Setting.WebPackage("ReplayType") = 2

Browser("").Page("").WebElement("").click

'Back to running mouse operations using browser events
Setting.WebPackage("ReplayType") = 1


来源:https://stackoverflow.com/questions/31517699/uft-12-01-click-and-fireevent-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!