Micro Focus QTP (UFT) Forums
Ctrl + click on the item - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Ctrl + click on the item (/Thread-Ctrl-click-on-the-item)



Ctrl + click on the item - Carol - 03-09-2008

Hi there,

Does anyone know how to Descriptive Programming the action of press the Ctrl key and click on an webElement at the same time?

I have referenced to this suggestion https://www.learnqtp.com/ways-to-send-keyboard-input-to-an-application-using-qtp-when-it-does-not-record-using-normal-recording/

But the example is do a Ctrl + f click

Many thanks for your suggestion

Carol


RE: Ctrl + click on the item - Carol - 03-13-2008

Hi there,

Does anyone know that Object.Type micLCtrlDwn is support for the webElement ? I have looked it up on the help document and can not find that. As I think this might be an alternative solution.

Thank you in advance.

Carol


reply - sreekanth - 03-15-2008

hey ,
here micctrldwn won't work since it releases the button once the step is completd.
i tried using reporter object.
just try it
Code:
Const cntrl = 29
Set deviceReplay = CreateObject( "Mercury.DeviceReplay" )
deviceReplay.KeyDown cntrl
Browser("Google").Page("Google").Link("Images").Click


use keyup method after the above step or click on control button after the run


RE: reply - Carol - 03-18-2008

Hi Sreekanth,

Thank you for your reply. I have tried your suggestion with the following codes:
Code:
Const cntrl = 29
Set deviceReplay = CreateObject( "Mercury.DeviceReplay" )
deviceReplay.KeyDown cntrl
Browser("title:=InfoView").Page("title:=InfoView").WebElement("html tag:=DIV","innertext:=1992").Click
Browser("title:=InfoView").Page("title:=InfoView").WebElement("html tag:=DIV","innertext:=1993").Click

What I have expected is with Ctrl Click, I can do a multiple selections. Hence, here I hope to multiplly select column 1992 and 1993. However, the above codes do as a single click , the effect of Ctrl did not show. Do you any suggestion how my code is different from yours?

Many thanks

Carol


RE: Ctrl + click on the item - sreekanth - 03-18-2008

hey ,
can you send me your webpage html code?


RE: Ctrl + click on the item - Carol - 03-19-2008

Hi Sreekanth,

thank you for your suggestion here again. As the webpage is fairly Complex, I decide to just catch the table html source that has all the columns I want to do a multiple selection. Together I have a snapshot for your reference.

Thank you in advance,
Carol