@@ -145,6 +145,7 @@ public void checkIfMessageShownAsPopUpForImproperIntent() throws Exception {
145145 onView (withText ("Tips and tricks 2" )).perform (click ());
146146 intended (allOf (hasComponent (IterableInboxMessageActivity .class .getName ())), times (0 ));
147147 onView (withId (R .id .webView )).inRoot (isDialog ()).check (matches (isDisplayed ()));
148+ onWebView (withId (R .id .webView )).forceJavascriptEnabled ();
148149 onWebView ().withElement (findElement (Locator .XPATH , "//*[contains(text(),'Ok, got it')]" ));
149150 }
150151
@@ -165,6 +166,7 @@ public void checkIfMessageShownAsPopUpForUnexpectedIntent() throws Exception {
165166 onView (withText ("Tips and tricks 2" )).perform (click ());
166167 intended (allOf (hasComponent (IterableInboxMessageActivity .class .getName ())), times (0 ));
167168 onView (withId (R .id .webView )).inRoot (isDialog ()).check (matches (isDisplayed ()));
169+ onWebView (withId (R .id .webView )).forceJavascriptEnabled ();
168170 onWebView ().withElement (findElement (Locator .XPATH , "//*[contains(text(),'Ok, got it')]" ));
169171 }
170172
@@ -182,6 +184,7 @@ public void checkIfMessageShownAsPopUpForNoIntent() throws Exception {
182184 onView (withText ("Tips and tricks 2" )).perform (click ());
183185 intended (allOf (hasComponent (IterableInboxMessageActivity .class .getName ())), times (0 ));
184186 onView (withId (R .id .webView )).inRoot (isDialog ()).check (matches (isDisplayed ()));
187+ onWebView (withId (R .id .webView )).forceJavascriptEnabled ();
185188 onWebView ().withElement (findElement (Locator .XPATH , "//*[contains(text(),'Ok, got it')]" ));
186189 }
187190
@@ -203,6 +206,7 @@ public void checkIfMessageShownAsPopUp() throws Exception {
203206 onView (withText ("Tips and tricks 2" )).perform (click ());
204207 intended (allOf (hasComponent (IterableInboxMessageActivity .class .getName ())), times (0 ));
205208 onView (withId (R .id .webView )).inRoot (isDialog ()).check (matches (isDisplayed ()));
209+ onWebView (withId (R .id .webView )).forceJavascriptEnabled ();
206210 onWebView ().withElement (findElement (Locator .XPATH , "//*[contains(text(),'Ok, got it')]" ));
207211 }
208212
0 commit comments