private void loadInitialPage ( App app , String url , Reporter reporter ) { String startingPage = "The initial url of <i>" ; String act = "Opening new browser and loading up initial url" ; String expected = startingPage + url + "</i> will successfully load" ; if ( app != null ) { try { app . getDriver ( ) . get ( url ) ; if ( ! app . get ( ) . url ( ) . contains ( url ) ) { reporter . fail ( act , expected , startingPage + app . get ( ) . url ( ) + "</i> loaded instead of <i>" + url + "</i>" ) ; return ; } reporter . pass ( act , expected , startingPage + url + "</i> loaded successfully" ) ; } catch ( Exception e ) { log . warn ( e ) ; reporter . fail ( act , expected , startingPage + url + "</i> did not load successfully" ) ; } app . acceptCertificate ( ) ; } }
Loads the initial app specified by the url and ensures the app loads successfully