将鼠标()移动到给定的 [x, y] 坐标然后单击并使用空手道框架输入数据

问题描述 投票:0回答:1

使用 Selenium Java -->
动作 action = new Actions(driver);

action.moveToElement(webElement, 100, 200).click().perform();

action.sendKeys("textToWrite");`

使用空手道 -->

来自 https://karatelabs.github.io/karate/karate-core/#chaining

的空手道文档

Image

鼠标().移动(100,200)).点击()

但找不到任何数据输入(类似于 selenium 中的 sendKeys)。

我尝试使用 input (locator,'textToWrite) 但它不能使用,因为有 x,y 坐标而不是文本定位器来定位元素

karate ui-automation
1个回答
0
投票

做完

input('body', 'some text')
后再做
click()
,可以做下一步

如果这不起作用 - 请提供一个链接到一个实例,我们将不得不弄清楚是否需要改进。

© www.soinside.com 2019 - 2024. All rights reserved.