<commit_before>package org.openlmis.pageobjects;


import com.thoughtworks.selenium.SeleneseTestNgHelper;
import org.openlmis.UiUtils.TestWebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.How;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.pagefactory.AjaxElementLocatorFactory;

import java.io.IOException;
import java.util.*;


public class InitiateRnRPage extends Page {

    @FindBy(how = How.XPATH, using = "//div[@id='requisition-header']/h2")
    private static WebElement requisitionHeader;

    @FindBy(how = How.XPATH, using = "//div[@id='requisition-header']/div[@class='info-box']/div[@class='row-fluid'][1]/div[1]")
    private static WebElement facilityLabel;

    @FindBy(how = How.XPATH, using = "//input[@value='Save']")
    private static WebElement saveButton;

    @FindBy(how = How.XPATH, using = "//input[@value='Submit']")
    private static WebElement submitButton;

    @FindBy(how = How.XPATH, using = "//input[@value='Authorize']")
    private static WebElement authorizeButton;


    @FindBy(how = How.XPATH, using = "//div[@id='saveSuccessMsgDiv' and @ng-bind='message']")
    private static WebElement successMessage;

    @FindBy(how = How.XPATH, using = "//div[@id='submitSuccessMsgDiv' and @ng-bind='submitMessage']")
    private static WebElement submitSuccessMessage;

    @FindBy(how = How.XPATH, using = "//div[@id='submitFailMessage' and @ng-bind='submitError']")
    private static WebElement submitErrorMessage;

    @FindBy(how = How.ID, using = "A_0")
    private static WebElement beginningBalance;

    @FindBy(how = How.ID, using = "B_0")
    private static WebElement quantityReceived;

    @FindBy(how = How.ID, using = "C_0")
    private static WebElement quantityDispensed;

    @FindBy(how = How.ID, using = "D_0")
    private static WebElement lossesAndAdjustments;

    @FindBy(how = How.ID, using = "E_7")
    private static WebElement stockOnHand;

    @FindBy(how = How.ID, using = "F_0")
    private static WebElement newPatient;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[13]/ng-switch/span/ng-switch/span")
    private static WebElement maximumStockQuantity;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[14]/ng-switch/span/ng-switch/span")
    private static WebElement caculatedOrderQuantity;

    @FindBy(how = How.ID, using = "J_0")
    private static WebElement requestedQuantity;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[11]/ng-switch/span/ng-switch/span")
    private static WebElement adjustedTotalConsumption;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[12]/ng-switch/span/ng-switch/span")
    private static WebElement amc;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[20]/ng-switch/span/ng-switch/span")
    private static WebElement totalCost;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[19]/ng-switch/span/ng-switch/span")
    private static WebElement pricePerPack;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[18]/ng-switch/span/ng-switch/span")
    private static WebElement packsToShip;

    @FindBy(how = How.ID, using = "W_0")
    private static WebElement requestedQuantityExplanation;

    @FindBy(how = How.ID, using = "X_0")
    private static WebElement totalStockOutDays;


    @FindBy(how = How.XPATH, using = "//a[@class='rnr-adjustment']")
    private static WebElement addDescription;

    @FindBy(how = How.XPATH, using = "//div[@class='adjustment-field']/div[@class='row-fluid']/div[@class='span5']/select")
    private static WebElement lossesAndAdjustmentSelect;


    @FindBy(how = How.XPATH, using = "//input[@ng-model='lossAndAdjustment.quantity']")
    private static WebElement quantityAdj;

    @FindBy(how = How.XPATH, using = "//input[@value='Add']")
    private static WebElement addButton;

    @FindBy(how = How.XPATH, using = "//div[@class='adjustment-list']/ul/li/span[@class='tpl-adjustment-type ng-binding']")
    private static WebElement adjList;

    @FindBy(how = How.XPATH, using = "//input[@id='D_6_0']")
    private static WebElement adjListValue;

    @FindBy(how = How.XPATH, using = "//div[@class='adjustment-total clearfix alert alert-warning ng-binding']")
    private static WebElement totalAdj;

    @FindBy(how = How.XPATH, using = "//input[@value='Done']")
    private static WebElement doneButton;

    @FindBy(how = How.XPATH, using = "//span[@class='alert alert-warning reason-request']")
    private static WebElement requestedQtyWarningMessage;

    @FindBy(how = How.XPATH, using = "//div[@class='info-box']/div[2]/div[3]")
    private static WebElement reportingPeriodInitRnRScreen;



    String successText="R&R saved successfully!";


    public InitiateRnRPage(TestWebDriver driver) throws  IOException {
        super(driver);
        PageFactory.initElements(new AjaxElementLocatorFactory(testWebDriver.getDriver(), 10), this);
        testWebDriver.setImplicitWait(25);
    }

    public void verifyRnRHeader(String FCode, String FName, String FCstring, String program, String periodDetails)
    {
<commit_msg>Manjyot, Lokesh| Fixing FT i.e. ng-binding removed from the locator as per changes made by devs<commit_after>package org.openlmis.pageobjects;


import com.thoughtworks.selenium.SeleneseTestNgHelper;
import org.openlmis.UiUtils.TestWebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.How;
import org.openqa.selenium.support.PageFactory;
import org.openqa.selenium.support.pagefactory.AjaxElementLocatorFactory;

import java.io.IOException;
import java.util.*;


public class InitiateRnRPage extends Page {

    @FindBy(how = How.XPATH, using = "//div[@id='requisition-header']/h2")
    private static WebElement requisitionHeader;

    @FindBy(how = How.XPATH, using = "//div[@id='requisition-header']/div[@class='info-box']/div[@class='row-fluid'][1]/div[1]")
    private static WebElement facilityLabel;

    @FindBy(how = How.XPATH, using = "//input[@value='Save']")
    private static WebElement saveButton;

    @FindBy(how = How.XPATH, using = "//input[@value='Submit']")
    private static WebElement submitButton;

    @FindBy(how = How.XPATH, using = "//input[@value='Authorize']")
    private static WebElement authorizeButton;


    @FindBy(how = How.XPATH, using = "//div[@id='saveSuccessMsgDiv' and @ng-bind='message']")
    private static WebElement successMessage;

    @FindBy(how = How.XPATH, using = "//div[@id='submitSuccessMsgDiv' and @ng-bind='submitMessage']")
    private static WebElement submitSuccessMessage;

    @FindBy(how = How.XPATH, using = "//div[@id='submitFailMessage' and @ng-bind='submitError']")
    private static WebElement submitErrorMessage;

    @FindBy(how = How.ID, using = "A_0")
    private static WebElement beginningBalance;

    @FindBy(how = How.ID, using = "B_0")
    private static WebElement quantityReceived;

    @FindBy(how = How.ID, using = "C_0")
    private static WebElement quantityDispensed;

    @FindBy(how = How.ID, using = "D_0")
    private static WebElement lossesAndAdjustments;

    @FindBy(how = How.ID, using = "E_7")
    private static WebElement stockOnHand;

    @FindBy(how = How.ID, using = "F_0")
    private static WebElement newPatient;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[13]/ng-switch/span/ng-switch/span")
    private static WebElement maximumStockQuantity;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[14]/ng-switch/span/ng-switch/span")
    private static WebElement caculatedOrderQuantity;

    @FindBy(how = How.ID, using = "J_0")
    private static WebElement requestedQuantity;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[11]/ng-switch/span/ng-switch/span")
    private static WebElement adjustedTotalConsumption;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[12]/ng-switch/span/ng-switch/span")
    private static WebElement amc;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[20]/ng-switch/span/ng-switch/span")
    private static WebElement totalCost;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[19]/ng-switch/span/ng-switch/span")
    private static WebElement pricePerPack;

    @FindBy(how = How.XPATH, using = "//table[@class='table table-striped table-bordered']/tbody/tr[1]/td[18]/ng-switch/span/ng-switch/span")
    private static WebElement packsToShip;

    @FindBy(how = How.ID, using = "W_0")
    private static WebElement requestedQuantityExplanation;

    @FindBy(how = How.ID, using = "X_0")
    private static WebElement totalStockOutDays;


    @FindBy(how = How.XPATH, using = "//a[@class='rnr-adjustment']")
    private static WebElement addDescription;

    @FindBy(how = How.XPATH, using = "//div[@class='adjustment-field']/div[@class='row-fluid']/div[@class='span5']/select")
    private static WebElement lossesAndAdjustmentSelect;


    @FindBy(how = How.XPATH, using = "//input[@ng-model='lossAndAdjustment.quantity']")
    private static WebElement quantityAdj;

    @FindBy(how = How.XPATH, using = "//input[@value='Add']")
    private static WebElement addButton;

    @FindBy(how = How.XPATH, using = "//div[@class='adjustment-list']/ul/li/span[@class='tpl-adjustment-type ng-binding']")
    private static WebElement adjList;

    @FindBy(how = How.XPATH, using = "//input[@id='D_6_0']")
    private static WebElement adjListValue;

    @FindBy(how = How.XPATH, using = "//div[@class='adjustment-total clearfix alert alert-warning']")
    private static WebElement totalAdj;

    @FindBy(how = How.XPATH, using = "//input[@value='Done']")
    private static WebElement doneButton;

    @FindBy(how = How.XPATH, using = "//span[@class='alert alert-warning reason-request']")
    private static WebElement requestedQtyWarningMessage;

    @FindBy(how = How.XPATH, using = "//div[@class='info-box']/div[2]/div[3]")
    private static WebElement reportingPeriodInitRnRScreen;



    String successText="R&R saved successfully!";


    public InitiateRnRPage(TestWebDriver driver) throws  IOException {
        super(driver);
        PageFactory.initElements(new AjaxElementLocatorFactory(testWebDriver.getDriver(), 10), this);
        testWebDriver.setImplicitWait(25);
    }

    public void verifyRnRHeader(String FCode, String FName, String FCstring, String program, String periodDetails)
    {

{'fraction_non_alphanumeric': 0.14684367380113791, 'fraction_numerical': 0.007586020048767272, 'mean_word_length': 4.394057476863127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5940514', 'n_tokens_mistral': 3686, 'n_tokens_neox': 3533, 'n_words': 716}