空手道 UI 自动化 - 如何从 CK 编辑器组件中清除文本? [英] Karate UI Automation - How to clear Text from the CK Editor component?

查看:40
本文介绍了空手道 UI 自动化 - 如何从 CK 编辑器组件中清除文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何清除CK编辑器中的所有文本/内容?我已经尝试了所有方法,例如:value(locator, '') 或 * clear(locator).仍然不工作&即使未清除该字段,测试用例也会通过.

How to clear all text/content from the CK editor? I've already tried all methods such as: value(locator, '') or * clear(locator). Still not working & test cases are getting passed even though the field is not cleared.

可以在这里参考实际示例 - https://ckeditor.com/docs/ckeditor5/latest/features/mentions.html

Can refer actual example here - https://ckeditor.com/docs/ckeditor5/latest/features/mentions.html

谁能帮我解决另一个问题?谢谢

Can anyone help me with the other solution? thanks

推荐答案

给你:

* script('.ck-editor__editable', "_.ckeditorInstance.setData('')")

这篇关于空手道 UI 自动化 - 如何从 CK 编辑器组件中清除文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆