简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM