简体   繁体   English

UFT 12.01“ .click”和“ FireEvent”不起作用

[英]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. 我有一个代码Browser("").Page("").WebElement("").click以前运行较早,但现在却没有。 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 . FireEvent也是如此。

I have tried different methods to work around it like - using ChildObjects and using Replay Type as Mouse instead of Event . 我尝试了多种不同的方法来解决它,例如使用ChildObjects并将重播类型用作Mouse而不是Event

It works with Replay Type but UFT crashes when Replay Type is changed back to Event . 它适用于重播类型,但是当重播类型更改回Event时, UFT崩溃。

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). 两种系统都运行UFT 12.01 ,一个系统具有IE 11 (在不起作用的地方),第二个系统具有IE 8 (在它起作用的地方)。

Does it have to with IE version ? 是否必须使用IE版本? As I read somewhere that these events are related to the DOM . 当我在某处阅读时,这些事件与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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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