在Appium Python中切换整个测试套件的软件键盘 [英] Toggle Software Keyboard for entire test suite in appium python
问题描述
当前,我正在使用Python Appium编写iOS
测试,并希望完全隐藏每次需要输入内容时都会弹出的软件键盘.我已经知道driver.hide_keyboard()
函数,但是很难在测试中的任何地方都包含它.
Currently I am writing iOS
tests using Python Appium and would like to completely hide the software keyboard which pops up whenever you have to type something. I am already aware of driver.hide_keyboard()
function but it's a pain to include it everywhere in tests.
我正在查看 Appium所需的功能但找不到会禁用软件键盘的任何东西.赞赏有人可以在这里帮助我吗?
I was going over the Appium Desired Capabilites but couldn't find anything that will disable the software keyboard. Appreciate if anyone can help me here?
推荐答案
要在iOS模拟器中禁用软键盘,请执行以下操作:
To disable soft keyboard in iOS simulator do this:
模拟器菜单>硬件>键盘>连接硬件键盘(启用)
Simulator Menu > Hardware > Keyboard > Connect Hardware Keyboard (enable it)
即使您退出并重新打开模拟器,选择也将保留.我不确定出厂重置模拟器后会发生什么情况.
Even if you quit and reopen the simulator, the selection will stay. I'm not sure what happens when you factory reset the simulator.
附有屏幕截图.
这篇关于在Appium Python中切换整个测试套件的软件键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!