/** * Navigate to the User Language page. * * @param drone * @return */ public static LanguageSettingsPage navigateToLanguage(WebDrone drone) { SharePage sharePage = getSharePage(drone); if (sharePage instanceof LanguageSettingsPage) { return ((LanguageSettingsPage) sharePage).render(); } else { MyProfilePage myProfilePage = sharePage.getNav().selectMyProfile().render(); return myProfilePage.getProfileNav().selectLanguage().render(); } }
/** * Navigate to the User Sites List page. * * @param drone * @return */ public static UserSitesPage navigateToUserSites(WebDrone drone) { SharePage sharePage = getSharePage(drone); if (sharePage instanceof UserSitesPage) { return ((UserSitesPage) sharePage).render(); } else { MyProfilePage myProfilePage = sharePage.getNav().selectMyProfile().render(); return myProfilePage.getProfileNav().selectSites().render(); } }
/** * Navigate to the User Notification page. * * @param drone * @return */ public static NotificationPage navigateToNotifications(WebDrone drone) { SharePage sharePage = getSharePage(drone); if (sharePage instanceof NotificationPage) { return ((NotificationPage) sharePage).render(); } else { MyProfilePage myProfilePage = sharePage.getNav().selectMyProfile().render(); return myProfilePage.getProfileNav().selectNotification().render(); } }
/** * @param drone * @return */ public static TrashCanPage navigateToTrashCan(WebDrone drone) { SharePage sharePage = getSharePage(drone); if (sharePage instanceof TrashCanPage) { return ((TrashCanPage) sharePage).render(); } else { MyProfilePage myProfilePage = sharePage.getNav().selectMyProfile().render(); return myProfilePage.getProfileNav().selectTrashCan().render(); } }