12-18-2012, 03:11 PM
(This post was last modified: 12-18-2012, 03:15 PM by lucieclaire.)
Hi, thanks for your reply. I found one solution work for me
I hope this will help others persons
Lucie.
Someone now of to close this thread as "resolved" ? thanks
Lucie.
Code:
Dim MyWebelement
Dim hwnd, DeviceReplay
Dim GetX, GetY
'I catch handler of IE where i will apply CTRL command
hwnd =Browser("D2_").GetROProperty("hwnd")
'I use library "Mercury.DeviceReplay" and Left Click of a mouse
Set DeviceReplay = CreateObject("Mercury.DeviceReplay")
'Command Ctrl Down on the IE
window("hwnd:=" & hwnd).type micCtrlDwn
'I get my Webelement
Set MyWebelement = Browser("browser").Page("page").WebElement("mywebelement")
'Found the position X and Y for my element i want to select
GetX = MyWebelement.GetROProperty("abs_x")
GetY = MyWebelement.GetROProperty("abs_y")
'Simulate de left click on this position (= mywebElement position)
DeviceReplay.MouseClick GetX,GetY, LEFT_MOUSE_BUTTON
wait 1
'Commnd Ctrl Up
window("hwnd:=" & hwnd).type micCtrlUp
'RAZ
Set DeviceReplay = Nothing
I hope this will help others persons
Lucie.
Someone now of to close this thread as "resolved" ? thanks
Lucie.