Make logic to check activePopups more robust
authorGorka Gil <gorka.gil@openbravo.com>
Tue, 02 Apr 2019 09:19:48 +0200
changeset 8457 80d269396c1c
parent 8456 6e710d2cf322
child 8458 799596a77295
Make logic to check activePopups more robust
src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/MobileCoreAPI.java
--- a/src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/MobileCoreAPI.java	Thu Nov 22 14:13:20 2018 -0500
+++ b/src-test/org/openbravo/test/mobile/retail/mobilecore/javascript/MobileCoreAPI.java	Tue Apr 02 09:19:48 2019 +0200
@@ -205,8 +205,8 @@
   }
 
   public static long numActivePopups() {
-    Object numActivePopups = SeleniumHelper
-        .executeScriptWithReturn("OB.MobileApp.view.activePopups.length");
+    Object numActivePopups = SeleniumHelper.executeScriptWithReturn(
+        "OB.MobileApp.view.activePopups ? OB.MobileApp.view.activePopups.length : 0");
     if (numActivePopups != null) {
       return (long) numActivePopups;
     } else {