protected String getWebAppURL() throws XPathExpressionException { return automationContext.getContextUrls().getWebAppURL(); }
/** * This method obtains base URl (ex: https://localhost:9443) required for the full endpoint creation * * @return String as a context URL */ private String getBaseUrl() { if (esContext == null) { throw new IllegalStateException("init() has not been successfully called"); } try { return esContext.getContextUrls().getWebAppURL(); } catch (XPathExpressionException e) { LOG.error("Couldn't obtain WebAppUrl", e); throw new RuntimeException("Error while obtaining WebAppUrl ", e); } }
String tempUrl = contextUrls.getWebAppURL(); if (tempUrl.contains("/t/")) { tempUrl = tempUrl.split("/t/")[0];
protected void init(TestUserMode testUserMode) throws Exception { storeContext = new AutomationContext("es", "store", testUserMode); publisherContext = new AutomationContext("es", "publisher", testUserMode); automationContext = new AutomationContext("es",testUserMode); loginLogoutClient = new LoginLogoutClient(automationContext); sessionCookie = loginLogoutClient.login(); backendURL = automationContext.getContextUrls().getBackEndUrl(); webAppURL = automationContext.getContextUrls().getWebAppURL(); userInfo = automationContext.getContextTenant().getContextUser(); }
protected void init(TestUserMode userType) throws Exception { esContext = new AutomationContext("ES", userType); automationContext = esContext; LoginLogoutClient loginLogoutClient = new LoginLogoutClient(esContext); sessionCookie = loginLogoutClient.login(); //return the current tenant as the userType(TestUserMode) tenantInfo = esContext.getContextTenant(); //return the user information initialized with the system userInfo = automationContext.getContextTenant().getContextUser(); backendURL = automationContext.getContextUrls().getBackEndUrl(); webAppURL = automationContext.getContextUrls().getWebAppURL(); storeContext = new AutomationContext("ES", "store", userType); publisherContext = new AutomationContext("ES", "publisher", userType); } protected void init(String tenantKey, String userKey) throws Exception {