简体   繁体   中英

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?

Browser is 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. Tested the code on 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

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