简体   繁体   中英

How to Hold on the Shift Button to Click on Object simultaniously in UFT?

在我的应用程序中,我需要按住Shift键点击Web元素然后它工作正常所以我不知道该怎么做。

Welcome to StackOverflow, you could find the answer by searching on Google.

This link probably has what you need, but to summarize:

Try using the SendKeys method (you may need to look up the proper syntax etc.)

SendKeys (micShiftdown)
Click where you need to click
Click the second selection SendKeys (micShiftup)

Something like that.

There is also another suggestion in here :

Window("Windows Internet Explorer").Type micShiftDwn

set abc =Browser("creationtime:=1").Page("title:=.*").WebE lement("innertext:=abc1","innerhtml:=abc1")

abc.click

set abc2 =Browser("creationtime:=1").Page("title:=.*").WebE lement("innertext:=abc2","innerhtml:=abc2")

abc2.Click

Window("Windows Internet Explorer").Type micShiftUp

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