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

查看:23
本文介绍了在 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.

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?

解决方案

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.

screenshots attached.

这篇关于在 appium python 中为整个测试套件切换软件键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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