gpt4 book ai didi

ios - 葫芦 cucumber ios : how to delete a char in textField

转载 作者:行者123 更新时间:2023-11-29 12:08:16 26 4
gpt4 key购买 nike

我正在尝试使用 --keyboard_enter_char "Delete"-- 删除 textField 中的字符,这是我在步骤定义中的代码。

touch(query("textField")[0])        # touch the textField and bring up the keyboard, working
keyboard_enter_text("a") # enter "a" into the textField, working
keyboard_enter_char "delete" # I expect to see the "a" gone

所以当keyboard_enter_char "delete"被执行

我遇到了一个错误

typing character 'delete' is not yet supported when running with Instruments (RuntimeError) 

然后脚本停止。

谁能告诉我我做错了什么或者我应该如何从 textField 中删除一个字符?谢谢!

最佳答案

正如我在您发表的 Calabash iOS 论坛帖子中提到的,正确的用法是:

keyboard_enter_char("Delete")

我们有一个关于触摸删除键的未决问题。

Use UIAutomation JavaScript to touch keyboard Delete key #942

Aravin 建议的 :wait_after_char 很可能没有效果。

请不要交叉发帖。

关于ios - 葫芦 cucumber ios : how to delete a char in textField,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34294172/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com