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.
我有一个代码 - 浏览器()。 .WebElement()。点击
- 以前用于运行,但现在它没有。属性保持不变,突出显示时突出显示,执行时会转到应用程序,但不会点击。 FireEvent
的情况也是如此。
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
.
我尝试过不同的方法来解决它,比如 - 使用 ChildObjects ,并使用重播类型作为鼠标而不是事件。
I have tried different methods to work around it like - using ChildObjects and using Replay Type as Mouse instead of Event.
它适用于重播类型,但是当重播类型更改为 时, UFT 崩溃
It works with Replay Type but UFT crashes when Replay Type is changed back to Event.
无论如何,我很好奇,知道相同的代码如何在不同的机器上工作,而不必做任何解决方法,而不是我的。
系统运行 UFT 12.01 ,一个 IE 11 (不起作用),第二个是 IE 8 (在哪里工作)。
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).
它是否必须与IE版本?当我读到这些事件与 DOM 相关的地方。
Does it have to with IE version ? As I read somewhere that these events are related to the DOM.
欣赏你的想法/输入这里
Appreciate your thoughts/Inputs here
推荐答案
尝试一下:
'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
这篇关于UFT 12.01“.click”和“FireEvent”不行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!