File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
src/main/java/org/thepalaceproject/ait Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,17 @@ private static AppiumTestContext createForBrowserstack(
101101 caps .setCapability ("platformName" , "Android" );
102102 caps .setCapability ("bstack:options" , browserstackOptions );
103103
104+ /*
105+ * Pass an extra option to the app: The app code checks for an
106+ * AutomatedTesting value on startup and configures itself to use
107+ * the special test library rather than Palace Bookshelf.
108+ */
109+
110+ caps .setCapability (
111+ "appium:optionalIntentArguments" ,
112+ "--ez AutomatedTesting true"
113+ );
114+
104115 driver = new AndroidDriver (
105116 new URL ("https://hub.browserstack.com/wd/hub" ),
106117 caps );
@@ -128,9 +139,16 @@ private static AppiumTestContext createForLocal(
128139 try {
129140 LOG .debug ("Opening local Android driver..." );
130141
142+ /*
143+ * Pass an extra option to the app: The app code checks for an
144+ * AutomatedTesting value on startup and configures itself to use
145+ * the special test library rather than Palace Bookshelf.
146+ */
147+
131148 final var opts =
132149 new UiAutomator2Options ()
133150 .setPlatformName ("Android" )
151+ .setOptionalIntentArguments ("--ez AutomatedTesting true" )
134152 .setApp ("/app.apk" );
135153
136154 driver = new AndroidDriver (new URL ("http://127.0.0.1:4723/" ), opts );
You can’t perform that action at this time.
0 commit comments