How to automate right click using selenium 1

490 views
Skip to first unread message

ram navuluri

unread,
May 20, 2012, 12:16:32 PM5/20/12
to seleniu...@googlegroups.com
Hi,


        I want to automate right click in am using selenium.contactMenu.But i can't able to select an option from the right click can anyone plz help me how to select an option from the list opened after right click.  

-- 
Thanks in advance,
Ram Navuluri

lache...@gmail.com

unread,
May 20, 2012, 12:35:02 PM5/20/12
to seleniu...@googlegroups.com

Does the following work?
new Actions(driver).contextClick(element).build().perform();

ram navuluri

unread,
May 20, 2012, 1:47:13 PM5/20/12
to seleniu...@googlegroups.com
 Can plz help me how to do using selenium RC, in my company we are using RC

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/qUqtG9iscu8J.
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.



--
Ram Navuluri

Mike Riley

unread,
May 20, 2012, 3:04:36 PM5/20/12
to seleniu...@googlegroups.com
Do you mean contextMenu(String)?  There is no contactMenu() method.

Can you show us the HTML of the element you are trying to open the menu for?  You need to pass a locator for that element, so please show us your Selenium code as well.

Mike


On Sunday, May 20, 2012 9:16:32 AM UTC-7, ram navuluri wrote:

ram navuluri

unread,
May 20, 2012, 11:30:30 PM5/20/12
to seleniu...@googlegroups.com
Rite am using contestMeu(locator) it opens right click but i can't select an option from the opened menu

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/i6K9WInVhBMJ.

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.



--
Ram Navuluri

DAYANANDA REDDY CHALLA

unread,
May 21, 2012, 12:40:02 AM5/21/12
to seleniu...@googlegroups.com
Hi Ram,

I had come across a similar situation in my project where in i have to select an option in a menu that appers on right click.

Inline image 1

following is the implementation used in ide.

<tr>
    <td>clickAt</td>
    <td>//div[@title='agent_status']</td>
    <td></td>
</tr>
<tr>
    <td>contextMenuAt</td>
    <td>//div[@title='agent_status']</td>
    <td></td>
</tr>
<tr>
    <td>click</td>
    <td>link=Schedule</td>
    <td></td>
</tr>


clickAt
//div[@title='agent_status']

contextMenuAt
//div[@title='agent_status']

click
link=Schedule


hope this will help you.

Thanks & Regards,

DAYANANDA REDDY CHALLA

CA Technologies
Desk#: 040 - 66879839 | Mobile#: 09885 755073 |
-----------------------------------------------------------------------

The sooner you fall behind, the more time you'll have to catch up.

http://nandu310.wordpress.com


Untitled.png

tulsi.tester

unread,
May 21, 2012, 3:58:02 AM5/21/12
to Selenium Users
The items in the context menu should have some hot keys in order to
select. I think then only you can select with keyPress() method.

On May 21, 12:40 am, DAYANANDA REDDY CHALLA <dayanandcha...@gmail.com>
wrote:
> Hi Ram,
>
> I had come across a similar situation in my project where in i have to
> select an option in a menu that appers on right click.
>
> [image: Inline image 1]
>yP
> following is the implementation used in ide.
>
> <tr>
>     <td>clickAt</td>
>     <td>//div[@title='agent_status']</td>
>     <td></td>
> </tr>
> <tr>
>     <td>contextMenuAt</td>
>     <td>//div[@title='agent_status']</td>
>     <td></td>
> </tr>
> <tr>
>     <td>click</td>
>     <td>link=Schedule</td>
>     <td></td>
> </tr>
>
> clickAt
> //div[@title='agent_status']
>
> contextMenuAt
> //div[@title='agent_status']
>
> click
> link=Schedule
>
> hope this will help you.
>
> On Mon, May 21, 2012 at 9:00 AM, ram navuluri <ram.navul...@gmail.com>wrote:
>
>
>
>
>
>
>
>
>
> > Rite am using contestMeu(locator) it opens right click but i can't select
> > an option from the opened menu
>
>  Untitled.png
> 21KViewDownload
Reply all
Reply to author
Forward
0 new messages