Hello. I have activity for tests (which open any activity with parameters) and it works via adb. Here example command for adb:
adb shell am start -n "com.xxx.xxx/com.zzz.zzz.ui.test.TestActivity" --es "activity" "com.zzz.zzz.ui.opinion.NotificationScheduledActivity" --es "params" "\[\{name='date',type='date',value='2018-05-12'\},\{name='can_return',type='boolean',value=false\}\]"
But I not idea how I should do that this command works via appium (via wd commandstartActivity()
).
If I try does like this:
this.activity = {
appPackage: 'com.xxx.xxx',
appActivity: 'com.zzz.zzz.ui.test.TestActivity',
optionalIntentArguments: \` --es "activity" "com.zzz.zzz.ui.opinion.NotificationScheduledActivity" --es "params" "\\[\\{name='date',type='date',value='2018-05-22'\\},\\{name='can_return',type='boolean',value=false\\}\\]"\`
return driver.startActivity(activity)
its not work (activity try to statr but app crashed immeditary). And in the end appium says that activity never started.
How I should rewrite data in activity
?