def remove_station_module(driver, wait): driver.get(ServerRelated().serverToBeTested()+"/admin/") LoginPageCMS(driver, wait).login("admin", ServerRelated().admin_password()) allModulesPg = StationModulesPageCMS(driver, wait) allModulesPg.clickCheckboxForItem(title) deletePage = allModulesPg.selectDeleteAction() newPage = deletePage.clickConfirmationButton() assert not(newPage.elementExistsByLinkText(title)), "Station module not deleted"
def test_add_station_module(self): allModulesPg = StationModulesPageCMS(self.driver, self.wait) modulePg = allModulesPg.clickAddStationModuleButton() modulePg.selectLmSiteByVisibleText(lmSite) modulePg.typeTitle(title) modulePg.clickStartOnTodayLink() modulePg.clickEndOnTodayLink() modulePg.selectPlaceholderByVisibleText("Right Rail") modulePg = EditAddStationModulePageCMS(self.driver, self.wait) modulePg.typeSubhead(0, subhead) modulePg.typeLink(0, link) modulePg.typePromo(0, promo) modulePg.addImageInPromo(0, imageLink) modulePg = modulePg.clickSaveAndContinueEditingButton() self.assertTrue(('"%s" was added successfully' %title) in modulePg.getSuccessfullyEditMessage(), "Station module not added")