@@ -145,6 +145,7 @@ public void checkIfMessageShownAsPopUpForImproperIntent() throws Exception {
145
145
onView (withText ("Tips and tricks 2" )).perform (click ());
146
146
intended (allOf (hasComponent (IterableInboxMessageActivity .class .getName ())), times (0 ));
147
147
onView (withId (R .id .webView )).inRoot (isDialog ()).check (matches (isDisplayed ()));
148
+ onWebView (withId (R .id .webView )).forceJavascriptEnabled ();
148
149
onWebView ().withElement (findElement (Locator .XPATH , "//*[contains(text(),'Ok, got it')]" ));
149
150
}
150
151
@@ -165,6 +166,7 @@ public void checkIfMessageShownAsPopUpForUnexpectedIntent() throws Exception {
165
166
onView (withText ("Tips and tricks 2" )).perform (click ());
166
167
intended (allOf (hasComponent (IterableInboxMessageActivity .class .getName ())), times (0 ));
167
168
onView (withId (R .id .webView )).inRoot (isDialog ()).check (matches (isDisplayed ()));
169
+ onWebView (withId (R .id .webView )).forceJavascriptEnabled ();
168
170
onWebView ().withElement (findElement (Locator .XPATH , "//*[contains(text(),'Ok, got it')]" ));
169
171
}
170
172
@@ -182,6 +184,7 @@ public void checkIfMessageShownAsPopUpForNoIntent() throws Exception {
182
184
onView (withText ("Tips and tricks 2" )).perform (click ());
183
185
intended (allOf (hasComponent (IterableInboxMessageActivity .class .getName ())), times (0 ));
184
186
onView (withId (R .id .webView )).inRoot (isDialog ()).check (matches (isDisplayed ()));
187
+ onWebView (withId (R .id .webView )).forceJavascriptEnabled ();
185
188
onWebView ().withElement (findElement (Locator .XPATH , "//*[contains(text(),'Ok, got it')]" ));
186
189
}
187
190
@@ -203,6 +206,7 @@ public void checkIfMessageShownAsPopUp() throws Exception {
203
206
onView (withText ("Tips and tricks 2" )).perform (click ());
204
207
intended (allOf (hasComponent (IterableInboxMessageActivity .class .getName ())), times (0 ));
205
208
onView (withId (R .id .webView )).inRoot (isDialog ()).check (matches (isDisplayed ()));
209
+ onWebView (withId (R .id .webView )).forceJavascriptEnabled ();
206
210
onWebView ().withElement (findElement (Locator .XPATH , "//*[contains(text(),'Ok, got it')]" ));
207
211
}
208
212
0 commit comments