public static String getAppURL ( String clazz , ITestContext context ) throws InvalidHTTPException { String appURL = checkAppURL ( null , ( String ) context . getAttribute ( clazz + APP_URL ) , "The provided app via test case setup '" ) ; Properties prop = new Properties ( ) ; try ( InputStream input = new FileInputStream ( SELENIFIED ) ) { prop . load ( input ) ; } catch ( IOException e ) { log . info ( e ) ; } appURL = checkAppURL ( appURL , prop . getProperty ( APP_URL ) , "The provided app via Properties file '" ) ; appURL = checkAppURL ( appURL , System . getProperty ( APP_URL ) , "The provided app via System Properties '" ) ; if ( appURL != null ) { return appURL ; } throw new InvalidHTTPException ( "There was not a valid app provided to test. Please properly set the 'appURL'" ) ; }
Obtains the application under test as a URL . If the site was provided as a system property that value will override whatever was set in the particular test suite . If no site was set null will be returned which will causes the tests to error out