[下面是頁面元素的圖片,我想拖動svg元素裏面試過的動作類和機器人類,但也不行。如何使用硒在svg元素內執行拖放操作?
resizeblockTwo']">
<div class="chartCanvas js-resizeblockOne drpm-resize__block-one">
<div class="titleBar layout-align-space-between-center layout-row">
<graph-canvas class="ng-scope">
<section class="chartContainer">
<div class="chartArea joint-theme-default paper" droppable="">
<svg id="v-2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="100%" height="100%">
</div>
</section>
<div ng-transclude="">
</graph-canvas>
<div class="processflow-empty-message ng-scope" ng-if="emptyGraph" style="">
<div class="drpm-resize__grabber">
</div>
*嘗試操作類和機器人類* ...顯示你如何嘗試 – Andersson
Actions act = new Actions(fd); //找到我們需要拖動的元素WebElement drag = fd.findElement(By.cssSelector(「[type = InputData]」)); //找到我們需要放棄的元素WebElement drop = fd.findElement(By.cssSelector(「svg [id ='v-2']」)); //這會將元素拖動到目標act.dragAndDrop(drag,drop).build()。perform();代碼正在通過,但拖放不會發生。 –