【发布时间】:2016-03-23 06:41:33
【问题描述】:
我们有使用 Canvas 和 GoJS 构建的图表应用程序。工具箱中有很多控件,我想将特定元素拖到空白区域。
我尝试过通过操作方法,但那不起作用。
我试过代码:
actions.moveToElement(paletteCanvas, palette_node_x, palette_node_y);
actions.clickAndHold();
//Dragging selected node a little bit to make it work.
actions.moveToElement(paletteCanvas, palette_node_x, palette_node_y+50 );
//Now perform the actual move
actions.moveToElement(flowCanvas, diagramOffsetX , diagramOffsetY);
actions.release();
actions.perform();
也很难找到元素的偏移量。有什么方法可以让我使用 selenium 自动跟踪:
- 从工具箱拖放任何控件
- 从工具箱中选择任何特定控件
JSexecutor 有可能工作吗?
【问题讨论】:
标签: java canvas selenium-webdriver gojs