@Test public void testNavigatePages() throws Exception { // Initialize objects uploadPdfsHelper = new UploadPdfsHelper(getWebDriver()); navigatePagesHelper = new NavigatePagesHelper(getWebDriver()); // String emailId = "ttester"+getRandomInteger(1, 99)+"@yopmail.com"; // String fname = "orien"+getRandomInteger(1, 99)+"test"; ExecutionLog.LogAddClass( this.getClass().getName() + " and Test method " + Thread.currentThread().getStackTrace()[1].getMethodName()); try { // Open application // System.out.println("Testing Application URL: ------>"+application_url); getWebDriver().navigate().to(application_url); ExecutionLog.Log("Open application url"); // Navigate To Url getWebDriver() .navigate() .to( "http://beta2.testlab.xyzmo.com/wsi_nojava/?WorkstepID=81549EEBE99896FD20BE323DBE4F1D648E1BE0BDEC925B1C34600B25B07B3AEEB32EBFA7D4F159692FD1672BA84779BA"); navigatePagesHelper.waitForWorkAroundTime(3000); // Click on Next button navigatePagesHelper.CLickOnNext(); navigatePagesHelper.waitForWorkAroundTime(3000); ExecutionLog.Log("Click on next button"); // Click on Next button navigatePagesHelper.CLickOnNext(); navigatePagesHelper.waitForWorkAroundTime(3000); ExecutionLog.Log("Click on next button"); // Click on Previous button navigatePagesHelper.ClickOnPreviousBtn(); navigatePagesHelper.waitForWorkAroundTime(3000); ExecutionLog.Log("Click on next button"); // Click on Previous button navigatePagesHelper.ClickOnPreviousBtn(); navigatePagesHelper.waitForWorkAroundTime(3000); ExecutionLog.Log("Click on next button"); } catch (Error e) { captureScreenshot("testNavigatePages"); ExecutionLog.LogErrorMessage(e); throw e; } catch (Exception e) { captureScreenshot("testNavigatePages"); ExecutionLog.LogExceptionMessage(e); throw e; } }
@AfterMethod public void endMethods() throws Exception { ExecutionLog.LogEndClass(this.getClass().getName()); }