Source:
public void MercuryCuratedNavigationTest_004_navigateThroughDifferentUrl() { CuratedContentPageObject section = new CuratedContentPageObject(driver); String expectedUrl = urlBuilder.getUrlForPathWithoutWiki(Configuration.getWikiName(), MercurySubpages.CC_CATEGORY_TEMPLATES); String testUrl = expectedUrl; section.openWikiPage(testUrl); section.waitForLoadingSpinnerToFinish(); Assertion.assertUrlEqualToCurrentUrl(driver, expectedUrl); expectedUrl = urlBuilder.getUrlForPathWithoutWiki(Configuration.getWikiName(), MercurySubpages.CC_SECTION_CATEGORIES); testUrl = expectedUrl; section.openWikiPage(testUrl); section.waitForLoadingSpinnerToFinish(); Assertion.assertUrlEqualToCurrentUrl(driver, expectedUrl); expectedUrl = urlBuilder.getUrlForPath(Configuration.getWikiName(), MercurySubpages.CC_MAIN_PAGE); testUrl = urlBuilder.getUrlForPathWithoutWiki(Configuration.getWikiName(), MercurySubpages.CC_EMPTY_CATEGORY); section.openWikiPage(testUrl); section.waitForLoadingSpinnerToFinish(); Assertion.assertUrlEqualToCurrentUrl(driver, expectedUrl); expectedUrl = urlBuilder.getUrlForPath(Configuration.getWikiName(), MercurySubpages.CC_MAIN_PAGE); testUrl = urlBuilder.getUrlForPathWithoutWiki(Configuration.getWikiName(), MercurySubpages.CC_NOT_EXISTING_SECTION); section.openWikiPage(testUrl); section.waitForLoadingSpinnerToFinish(); MercuryAlertComponentObject mercuryError = new MercuryAlertComponentObject( driver, Mercury.AlertMessage.NOT_EXISTING_SECTION); Assertion.assertTrue(mercuryError.isAlertMessageVisible()); Assertion.assertUrlEqualToCurrentUrl(driver, expectedUrl); }

Target:
public void MercuryCuratedNavigationTest_004_navigateThroughDifferentUrl() { CuratedContentPageObject section = new CuratedContentPageObject(driver); String expectedUrl = urlBuilder.getUrlForPathWithoutWiki( Configuration.getWikiName(), MercurySubpages.CC_CATEGORY_TEMPLATES ); String testUrl = expectedUrl; section.openWikiPage(testUrl); section.waitForLoadingSpinnerToFinish(); Assertion.assertUrlEqualToCurrentUrl(driver, expectedUrl); expectedUrl = urlBuilder.getUrlForPathWithoutWiki( Configuration.getWikiName(), MercurySubpages.CC_SECTION_CATEGORIES ); testUrl = expectedUrl; section.openWikiPage(testUrl); section.waitForLoadingSpinnerToFinish(); Assertion.assertUrlEqualToCurrentUrl(driver, expectedUrl); expectedUrl = urlBuilder.getUrlForPath( Configuration.getWikiName(), MercurySubpages.CC_MAIN_PAGE ); testUrl = urlBuilder.getUrlForPathWithoutWiki( Configuration.getWikiName(), MercurySubpages.CC_EMPTY_CATEGORY ); section.openWikiPage(testUrl); section.waitForLoadingSpinnerToFinish(); Assertion.assertUrlEqualToCurrentUrl(driver, expectedUrl); expectedUrl = urlBuilder.getUrlForPath( Configuration.getWikiName(), MercurySubpages.CC_MAIN_PAGE ); testUrl = urlBuilder.getUrlForPathWithoutWiki( Configuration.getWikiName(), MercurySubpages.CC_NOT_EXISTING_SECTION ); section.openWikiPage(testUrl); section.waitForLoadingSpinnerToFinish(); MercuryAlertComponentObject mercuryError = new MercuryAlertComponentObject( driver, MercuryAlertComponentObject.AlertMessage.NOT_EXISTING_SECTION ); Assertion.assertTrue(mercuryError.isAlertMessageVisible()); Assertion.assertUrlEqualToCurrentUrl(driver, expectedUrl); }