在Appium Python中切换整个测试套件的软件键盘 [英] Toggle Software Keyboard for entire test suite in appium python

查看:116
本文介绍了在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屋!

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