Selenium - Middle mouse click

1,401 views
Skip to first unread message

Ansar

unread,
May 23, 2012, 7:05:02 AM5/23/12
to seleniu...@googlegroups.com
Hi All,

Can you suggest a way to 'middle-mouse click' on a link.

This link is an attachment in the e mail.

Upon clicking on this link one window will pop up and then i can save
the attachment.

Please suggest the way to do middle mouse click.


--
Kind Regards,
Ansar

Rajesh Ratakonda

unread,
May 23, 2012, 7:59:21 AM5/23/12
to seleniu...@googlegroups.com
You have Robot api in java to have a mouse and key board events. I think you should go with it.Since middle mouse click is Alt+mouseclick..
 

robo

.keyPress(KeyEvent.VK_ALT
);

robo

.delay(500);

robo.mousePress();

robo

.delay(500);

robo.mouseRelease();

robo

.delay(500);

robo.keyRelease(KeyEvent.VK_ALT);

I donno this is just my bit of idea. try it.

Rajesh.

 



--
Kind Regards,
Ansar

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


Reply all
Reply to author
Forward
0 new messages