[英]UFT scripting will highlight object, but won't click it
Why does the WebElement object highlight just fine, but the click doesn't do anything?为什么 WebElement 对象高亮显示就好了,但点击却没有任何反应?
Browser is Chrome.浏览器是 Chrome。
Statement are:声明如下:
Browser("Message Validators | ETT").Page("Message Validators | ETT").WebElement("css:=SPAN.btn.btn-default").Highlight
Browser("Message Validators | ETT").Page("Message Validators | ETT").WebElement("css:=SPAN.btn.btn-default").Click
Setting.WebPackage
will do the trick. Setting.WebPackage
可以解决问题。 Tested the code on Chrome.在 Chrome 上测试了代码。
'~~> Runs mouse operations using the mouse
Setting.WebPackage("ReplayType") = 2
Browser("name:=Message Validators.*ETT").Page("title:=Message Validators.*ETT").WebElement("xpath:=//span[contains(.,'Upload File')]").Click
'~~> Runs mouse operations using browser events
Setting.WebPackage("ReplayType") = 1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.