Xcode Record UI 测试 - 如何删除 XCTestCase 自动生成的代码下拉列表 [英] Xcode Record UI test - How to remove XCTestCase auto generated code drop downs
问题描述
请参阅附带的屏幕截图,当使用记录按钮生成 Xcode UI 测试代码时,生成的代码包含令人讨厌的下拉菜单,我无法弄清楚如何删除.
See the attached screen shot, when generating Xcode UI Test code using the record button, the generated code contains annoying drop downs that I cannot figure out how to remove.
推荐答案
我认为 Xcode 中没有任何内置函数可以做到这一点,所以我能想出的最好的是一个正则表达式,您可以使用它搜索和替换:
I don't think there's any built-in function in Xcode to do this, so the best I can come up with is a regex that you can use to search and replace:
/\*@START_MENU_TOKEN@\*/|/\*\[.+\]@END_MENU_TOKEN@\*/
有趣的是,这也适用于 Xcode 编辑器,即使实际文本 START_MENU_TOKEN
等被转换为下拉菜单并因此不可见.
Interestingly, this works in the Xcode editor too, even if the actual texts START_MENU_TOKEN
and so on are converted into dropdowns and as such invisible.
这篇关于Xcode Record UI 测试 - 如何删除 XCTestCase 自动生成的代码下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!