Forum Stats

  • 3,727,632 Users
  • 2,245,422 Discussions
  • 7,852,901 Comments

Discussions

Scripts are failing intermittently with TabManager_getCurrentTab Error: undefined

User_AA1TD
User_AA1TD Member Posts: 3 Employee
edited August 2019 in QA/Testing

Hi,

While doing automation of our products we found a issue that tab tab index of application is keep changing so Openscript tem provided us tabmanger function mentioned below. but now scripts are failing intermittently with error saying 'TabManager_getCurrentTab Error: undefined'. can you please help us to resolve this issue as it is affecting our automation.

Function:

private static String[] TabManager_functions = new String[]{

"function TabManager_getCurrentTab(){",

"  retV = [];",

"  try{",

"    var regId=getCurrentlyActiveRegion();",

"    var comp = AdfPage.PAGE.findComponent(regId);",

"    if(comp){",

"    retV[0] =  comp.getAbsoluteLocator();",

"     }",

"     else{",

"         throw new Error(\"Cannot find region by id: \" + regId);",

"     }",

"    return retV;",

"  }catch(err){",

"     marshalResult.setError(retV, err.description);",

"  }",

"  return retV;",

"}",

"",

"function isGetCurrentTabPresent(){",

"  var ret = (typeof getCurrentlyActiveRegion==\"function\");",

"   return ret;",

"}",

    };

Sign In or Register to comment.