/** * Method helps to click on the Email icon for response * * @param strResponseTitle * @author Usha * @return EmailResponsePage * @throws Exception */ public EmailResponsePage clickEmailIcon(String strResponseTitle) throws Exception { try { logInstruction( "LOG INSTRUCTION: CLICKING ON 'Email' ICON FOR RESPONSE '" + strResponseTitle + "'"); frameSwitch.switchToFrameContent(); imgEmailIcon.replaceValues(strResponseTitle); uiDriver.waitToBeDisplayed(imgEmailIcon, waitTime); imgEmailIcon.clickAndWait(waitTime); } catch (Exception e) { throw new Exception( "ISSUE IN CLICKING ON 'Email' ICON FOR RESPONSE '" + strResponseTitle + "'" + "\nMETHOD:clickEmailIcon \n" + e.getLocalizedMessage()); } return new EmailResponsePage(uiDriver); }
/** * This method will click the Begin Now button on the second page of Exam to be taken. * * @author Vivek.Singh * @return ViewExamPage * @throws Exception * */ public ViewExamPage clickBeginNowButton() throws Exception { try { logInstruction("LOG INSTRUCTION: CLICKING ON BEGIN NOW BUTTON"); frameSwitch.switchToFrameContent(); uiDriver.waitToBeDisplayed(btnBeginNow, waitTime); btnBeginNow.clickNoWait(); logInstruction("Clicked Begin Now button."); return new ViewExamPage(uiDriver); } catch (Exception e) { throw new Exception( "ISSUE IN CLICKING THE 'Begin Now' BUTTON" + "\n METHOD : clickBeginNowButton \n" + e.getLocalizedMessage()); } }
/** * This Method will check whether given Equell content is dispalyed or not. * * @param strEquellContent content which you are searching * @return Boolean * @throws Exception * @author Shishir.Dwivedi */ public boolean isEquellaContentDisplayed(String strEquellContent) throws Exception { flag = false; try { logInstruction( "LOG INSTRUCTION: CHECKING EQUELLACONTENT '" + strEquellContent + "' IS DISPLAYED OR NOT"); frameSwitch.switchToFrameContent(); uiDriver.waitToBeDisplayed(lblEquellaDisplayed, waitTime); if (StringUtils.isNotBlank(lblEquellaDisplayed.getText().trim())) { if (lblEquellaDisplayed.getText().trim().equalsIgnoreCase(strEquellContent)) { flag = true; } else { throw new Exception( "ISSUE IN VALIDATING EQUELLACONTENT '" + strEquellContent + "' IS DISPLAYED OR NOT" + "\nMETHOD:isEquellaContentDisplayed \n"); } } else { throw new Exception( "EQUELLACONTENT IS NULL '" + strEquellContent + "' IS DISPLAYED OR NOT" + "\nMETHOD:isEquellaContentDisplayed \n"); } } catch (Exception e) { throw new Exception( "ISSUE IN CHECKING EQUELLACONTENT '" + strEquellContent + "' IS DISPLAYED OR NOT" + "\nMETHOD:isEquellaContentDisplayed \n" + e.getLocalizedMessage()); } return flag; }