【发布时间】:2018-03-27 21:22:36
【问题描述】:
我需要移动我的物理鼠标指针。我正在使用 selenium 和 c#。
Actions action = new Actions(driver);
action.MoveByOffset(500, 500).ContextClick().Build().Perform();
//action.MoveToElement(element).ContextClick().Build().Perform();
MoveByOffset 和 MoveToElement 都在执行右键单击,但鼠标指针没有移动。
【问题讨论】:
-
你为什么要物理上
move your mouse pointer?请用您的确切 usecase 和相关 HTML 更新问题。 -
我需要显示鼠标指针移动并执行任务
-
那么你将如何验证
mouse pointer moving或不验证? -
我不需要验证鼠标移动。我的测试已经在做。我只需要直观地显示鼠标移动。
-
我觉得工作量很大,你可以看看这里:stackoverflow.com/questions/46231617/…
标签: c# selenium selenium-webdriver webdriver selenium-chromedriver