package com.mridul.framework.selenium.modals; import com.mridul.framework.selenium.pages.AbstractPage; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import java.util.Arrays; import java.util.List; /** * Created by Mridul on 3/17/2016. */ public class WebAuthorHelpModal extends AbstractModal{ @FindBy(id = "myModalLabel") private WebElement lbl_WebAuthorHelp_Anchor; @FindBy(id="order_now") private WebElement btn_OrderNow_Anchor; @FindBy(id="submit_order") private WebElement btn_SubmitOrder; @FindBy(id = "modaliframe") private WebElement iframe_modaliframe; @FindBy(xpath = "//*[@id='IO:155e5bb00fc7060040a7945f62050eff']") private WebElement selfld_Category; @FindBy(xpath = "//*[@id='IO:dd5e9bb00fc7060040a7945f62050e01']") private WebElement selfld_NatureOfRequest; @FindBy(xpath = "//*[@id='IO:255e9bb00fc7060040a7945f62050e05']") private WebElement txtarea_RequestDetails; @FindBy(xpath = "//*[@id='IO:3823341e0a0a0b27003118193596953f']") private WebElement txtarea_NotesOrComments; @Override protected List<WebElement> registerAnchors() { return Arrays.asList(lbl_WebAuthorHelp_Anchor, btn_OrderNow_Anchor); } @Override public WebAuthorHelpModal and() { return this; } @Override public WebAuthorHelpModal then() { return this; } public WebAuthorHelpModal(WebDriver driver, AbstractPage parentPage) { super(driver, parentPage); super.switchToIFrame(iframe_modaliframe); } public WebAuthorHelpModal selectPleaseChooseACategory(String text) { super.selectOptionByText(selfld_Category, text); return this; } public WebAuthorHelpModal selectNatureOfRequest(String text) { super.selectOptionByText(selfld_NatureOfRequest, text); return this; } public WebAuthorHelpModal fillInRequestDetails(String text) { super.populateTextField(txtarea_RequestDetails, text); return this; } public WebAuthorHelpModal fillInNotesOrComments(String text) { super.populateTextField(txtarea_NotesOrComments, text); return this; } public WebAuthorHelpModal clickOnOrderNowButton() { super.clickOnButton(btn_OrderNow_Anchor); return this; } public WebAuthorHelpModal clickOnSubmitOrder() { super.clickOnButton(btn_SubmitOrder); return this; } }
Friday, August 5, 2016
WebAuthorHelpModal
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment