File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed
src/test/java/io/appium/java_client/android Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -119,9 +119,9 @@ StartsActivity startsActivity = new StartsActivity() {
119119 }
120120};
121121
122- Activity activity = new Activity (" app package goes here" , " app activity goes here" );
123- activity . setWaitAppPackage(" app wait package goes here" );
124- activity . setWaitAppActivity(" app wait activity goes here" );
122+ Activity activity = new Activity (" app package goes here" , " app activity goes here" )
123+ .setWaitAppPackage(" app wait package goes here" );
124+ .setWaitAppActivity(" app wait activity goes here" );
125125StartsActivity startsActivity. startActivity(activity);
126126 ```
127127
Original file line number Diff line number Diff line change @@ -50,15 +50,17 @@ public class IntentTest {
5050
5151
5252 @ Test public void startActivityWithIntent () throws Exception {
53- assertTrue (((Predicate <AndroidDriver >) driver -> {
54- final Activity activity = new Activity ("com.android.mms" , ".ui.ComposeMessageActivity" );
55- activity .setIntentAction ("android.intent.action.SEND" );
56- activity .setIntentCategory ("android.intent.category.DEFAULT" );
57- activity .setIntentFlags ("0x4000000" );
58- activity .setOptionalIntentArguments ("-d \" TestIntent\" -t \" text/plain\" " );
53+ Predicate <AndroidDriver > predicate = driver -> {
54+ Activity activity = new Activity ("com.android.mms" ,
55+ ".ui.ComposeMessageActivity" )
56+ .setIntentAction ("android.intent.action.SEND" )
57+ .setIntentCategory ("android.intent.category.DEFAULT" )
58+ .setIntentFlags ("0x4000000" )
59+ .setOptionalIntentArguments ("-d \" TestIntent\" -t \" text/plain\" " );
5960 driver .startActivity (activity );
6061 return true ;
61- }).test (driver ));
62+ };
63+ assertTrue (predicate .test (driver ));
6264
6365 }
6466
You can’t perform that action at this time.
0 commit comments