csj 发表于 2011-7-26 16:22:43

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

Selenium IDE鼠标右击页面上的一个元素,用那个方法啊?

Arabellah 发表于 2011-7-27 11:38:58

本帖最后由 Arabellah 于 2011-7-27 11:42 编辑

只知道点击,不知道右击

dvsam 发表于 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.

csj 发表于 2011-8-4 16:17:10

回复 3# dvsam
大哥,这个方法是用来松开鼠标右击的吧

wwyfriend 发表于 2011-11-11 10:29:43

selenium.contextMenu(locator)

遇上鱼子 发表于 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]
查看完整版本: Selenium怎么鼠标右击页面上的一个元素,求指教?