51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 4776|回复: 5
打印 上一主题 下一主题

Selenium怎么鼠标右击页面上的一个元素,求指教?

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2011-7-26 16:22:43 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Selenium IDE鼠标右击页面上的一个元素,用那个方法啊?
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏
回复

使用道具 举报

该用户从未签到

2#
发表于 2011-7-27 11:38:58 | 只看该作者
本帖最后由 Arabellah 于 2011-7-27 11:42 编辑

只知道点击,不知道右击
回复 支持 反对

使用道具 举报

该用户从未签到

3#
发表于 2011-7-27 14:11:29 | 只看该作者
mouseUpRight(locator)
    Arguments:
        locator - an element locator
    Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) on the specified element.
回复 支持 反对

使用道具 举报

该用户从未签到

4#
 楼主| 发表于 2011-8-4 16:17:10 | 只看该作者
回复 3# dvsam
大哥,这个方法是用来松开鼠标右击的吧
回复 支持 反对

使用道具 举报

  • TA的每日心情
    擦汗
    2019-2-27 09:32
  • 签到天数: 164 天

    连续签到: 1 天

    [LV.7]测试师长

    5#
    发表于 2011-11-11 10:29:43 | 只看该作者
    selenium.contextMenu(locator)
    回复 支持 反对

    使用道具 举报

    该用户从未签到

    6#
    发表于 2011-11-21 16:25:52 | 只看该作者
    mouseDownRight
    public void mouseDownRight(java.lang.String locator)
    Description copied from interface: Selenium
    Simulates a user pressing the right mouse button (without releasing it yet) on the specified element.

    Specified by:
    mouseDownRight in interface Selenium
    Parameters:
    locator - an element locator

    然后
    mouseUpRight
    public void mouseUpRight(java.lang.String locator)
    Description copied from interface: Selenium
    Simulates the event that occurs when the user releases the right mouse button (i.e., stops holding the button down) on the specified element.

    Specified by:
    mouseUpRight in interface Selenium
    Parameters:
    locator - an element locator

    在使用过程中,需要多看API 和官方论坛
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-5-4 12:33 , Processed in 0.067376 second(s), 25 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表