Micro Focus QTP (UFT) Forums
How to get the links which appears on mouse hover of parent link - 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: How to get the links which appears on mouse hover of parent link (/Thread-How-to-get-the-links-which-appears-on-mouse-hover-of-parent-link)



How to get the links which appears on mouse hover of parent link - rajendra649 - 11-15-2011

Hi all,

I have scenario, where i ll have the set of links which appears only on mouse hovering the parent link, and if i tried to spy,QTP unable to spy on the links , Please help me out to resolve the issue

Thanks
Raju


RE: How to get the links which appears on mouse hover of parent link - ravi.gajul - 11-15-2011

Try this,

Code:
Browser().page().Link().FireEvent "onmouseover"
wait(2)
Regards,
Ravi


RE: How to get the links which appears on mouse hover of parent link - Ankesh - 11-16-2011

Hi Rajendra,

Press Control Key and mouse over the object which has set of links. U will be able to see the set of links under the object poping down. U can then release Ctrl key and select the required link.

Let me know if it does not work.

Regards,
Ankesh


RE: How to get the links which appears on mouse hover of parent link - rajendra649 - 11-16-2011

Thanks for your replies,I able to mouse hover the link ,but i am not able to click on the links which appeared after mouse hover the parent link,even QTP Object spy cannot recognise it,look at the attachment

Regards
Rajendra


RE: How to get the links which appears on mouse hover of parent link - Ankesh - 11-17-2011

Can you plz record it and paste the code?


RE: How to get the links which appears on mouse hover of parent link - Acharya_silu@yahoo.com - 11-17-2011

ANS:
Hi,

If spy doesnot works then i think only solution is that u can record the operation from application and the code which gets written in the Expert view .Try to run those scripts and see whether ur problem is solved or not.

Sometimes qtp unable to recognise particular operation so better we can try Record and Playback method to solve certain situation

Thanks


RE: How to get the links which appears on mouse hover of parent link - rajendra649 - 11-17-2011

Thanks for ur reply.but QTP unable to recording in normal mode.its recording analog mode only. I have tried with "oshell object "and "mercury.devicereply" object even i am not able to click on the links which appeared after mouse hover the parent link

Ex:
Code:
browser().page().webelement().fireevent "onmouseover"
set oshell = createobject(WScript.shell)
oshell.sendkeys "{DOWN}"
oshell.sendkeys "{ENTER}"
or
Code:
Set deviceReplay = CreateObject( "Mercury.DeviceReplay" )
deviceReplay.KeyDown VK_CONTROL
deviceReplay.PressKey  VK_A

for more understanding plz find the above screenshot
please help me


Thanks
Raju


RE: How to get the links which appears on mouse hover of parent link - satya123 - 08-25-2014

Hello,

Can give mouseover operation and how to get object information on mouseover on flipkart application
Thanks
Nagendra


RE: How to get the links which appears on mouse hover of parent link - vinod123 - 08-26-2014

There is a option in QTP interface called "Web Event Recording Configuration" in Tools Menu Chane the option from Basic to High and then start recording it will record the Mouse over, Mouse click and all the operations that required to verify the object


RE: How to get the links which appears on mouse hover of parent link - satish00k - 03-10-2017

I could work out using Fire event alone. My requirement is to mouse hover on x - then on y - and inside y - mouse over on one of the list items z - and click on it. The problem with UFT is - we can spy and identify properties for x and y levels - but we cannot spy on the list inside y to get z. 
So, just try a wild guess for z - based on what u see for x and y -  as all three belong to class - "Link" . for x and y - UFT identified name property and value is what u see in UI. Try this for z too - it might work... Worked for me . . . Smile
x -> y -> z


Set wd = browser("micclass:=Browser").Page("micclass:=page")
wd.link("name:=x").FireEvent "onmouseover"
wd.link("name:=y").FireEvent "onmouseover"
wd.link("name:=z").FireEvent "onmouseover"
wd.link("name:=z").Click