0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

UIDatePickerの日付の部分をAppiumで操作できるようにする

Posted at

やったこと

  1. 日付に対応しているXCUIElementTypePickerWheelのインスタンスを取ってくる
  2. 操作するためのhashを生成する
param.rb
param = {
  'order': 'next',
  'offset': 0.15,
  'element': date_picker
}
    1. で生成したhashを使って日付部分を操作するコードを書く。現在の日時からday日後を選択したくてday日分ループして選択させるようにしている。
run.rb
day.to_i.times do
  driver.execute_script("mobile: selectPickerWheelValue", param)
end

参考:https://appiumpro.com/editions/59

0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?