ruby - Appium iOS kill app without the plist being removed -


i trying run following steps: 1. launch app first time, see terms , agreement 2. agree terms , agreement 3. kill app , relaunch 4. should not see terms , agreement

right now, appium running on without --no-reset flag, since need app reset between scenarios, following re-launched app plist deleted (it's remove app , relaunch again)

sleep(3) pf_name = $driver.caps['platformname'] pf_ver = $driver.caps['platformversion'] dev_name = $driver.caps['devicename'] auto_accept_alert = $driver.caps['autoacceptalerts'] app_path = $driver.caps['app'] appium::driver.new({ caps: { platformname: pf_name, platformversion: pf_ver, devicename: dev_name, autoacceptalerts: auto_accept_alert, app: app_path, noreset: true} }) $driver.restart $driver.close_app $driver.launch_app 

i tried $driver.close_app , $driver.launch_app, did same thing (remove plist killing app).

is there way can kill app without removing plist?

i found answer.

it's of all-around involved sort of answer.

  1. tag scenario needs killing , relaunching without resetting something, @needplist
  2. in hooks.rb, in before @needplist, call appium::driver.new noreset flag set true. call $driver.restart (make sure in after same tag, call appium::driver.new noreset flag set false, , restart driver again)
  3. in step definition, can call $driver.close_app , $driver.launch_app without losing plist

that should trick, think.


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -