LoginSignup
8
7

More than 3 years have passed since last update.

【appium】send_keysで日本語入力するtips

Last updated at Posted at 2015-10-14

1. はじめに

appiumを使ったモバイル端末テスト自動化に取り組んで、
日本語の情報源が少なそうだった表題のケースについて投稿します。

2. send_keysで日本語入力できない

日本語入力サンプル
 find_element(:name, "本文").send_keys "テストの鬼"

と書いても日本語入力されないのはsend_keysで
unicodeキーボードのエミュレーションができてないから、だそうです。

3. 解決法

capabilitiesでunicodeKeyboard入力を有効にしてあげればよい。

capabilitiesサンプル
describe 'test_sample' do
  def desired_caps
    {
      caps:       {
        (中略)
        unicodeKeyboard:  'true'
        (中略)
      }
    }
  end

4. 補足

http://appium.io/slate/en/v1.4.8/?ruby#android-only
appiumページのドキュメントによると、Android-onlyのcapabilityなので
iOSではこのtipsは使えません。
まだ、iOSの日本語入力は試してないです。

8
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
8
7