64. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/8/2017 1:33:41 PM Central Standard Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

64.1 Files compared

# Location File Last Modified
1 PC_CP4_CiF.zip\FPPS_Frontend\fpps-app\Testing\src\testing RerouteClaimsPageTest.java Fri Dec 8 17:53:04 2017 UTC
2 PC_CP4_CiF.zip\FPPS_Frontend\fpps-app\Testing\src\testing RerouteClaimsPageTest.java Fri Dec 8 19:17:23 2017 UTC

64.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 4 1218
Changed 3 6
Inserted 0 0
Removed 0 0

64.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

64.4 Active regular expressions

No regular expressions were active.

64.5 Comparison detail

  1   /**
  2    * 
  3    */
  4   package te sting;
  5  
  6   import sta tic org.ju nit.Assert .*;
  7  
  8   import jav a.io.File;
  9   import jav a.util.Lis t;
  10   import jav a.util.con current.Ti meUnit;
  11  
  12   import org .junit.Aft er;
  13   import org .junit.Aft erClass;
  14   import org .junit.Bef ore;
  15   import org .junit.Bef oreClass;
  16   import org .junit.Fix MethodOrde r;
  17   import org .junit.run ners.Metho dSorters;
  18   import org .junit.Tes t;
  19   import org .junit.int ernal.Text Listener;
  20   import org .junit.run ner.JUnitC ore;
  21   import org .junit.run ner.Result ;
  22   import org .openqa.se lenium.By;
  23   import org .openqa.se lenium.Key s;
  24   import org .openqa.se lenium.NoS uchElement Exception;
  25   import org .openqa.se lenium.Web Driver;
  26   import org .openqa.se lenium.Web Element;
  27   import org .openqa.se lenium.ie. InternetEx plorerDriv er;
  28   import org .openqa.se lenium.sup port.ui.Se lect;
  29  
  30   /**
  31    * @author   DN S      PEREZF
  32    *
  33    */
  34   @FixMethod Order(Meth odSorters. NAME_ASCEN DING)
  35   public cla ss Reroute ClaimsPage Test {
  36           pr ivate WebD river driv er;
  37           pr ivate Stri ng baseUrl ;
  38           pr ivate Stri ng searchC laimsPageU rl;
  39           
  40           pu blic stati c void mai n(String a rgs[]) {
  41                    JUni tCore juni t = new JU nitCore();
  42                    juni t.addListe ner(new Te xtListener (System.ou t));
  43                    Resu lt result  = junit.ru n(RerouteC laimsPageT est.class) ; // Repla ce "Sample Test" with  the name  of your cl ass
  44                    if ( result.get FailureCou nt() > 0)  {
  45                         System.out .println(" Test faile d.\n" + re sult);
  46                         System.exi t(1);
  47                    } el se {
  48                         System.out .println(" Test finis hed succes sfully.");
  49                         System.exi t(0);
  50                    }
  51           }
  52  
  53           /* *
  54            *  @throws j ava.lang.E xception
  55            * /
  56           @B eforeClass
  57           pu blic stati c void set UpBeforeCl ass() thro ws Excepti on {
  58                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin setUp BeforeClas s()");
  59                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd setUpBe foreClass( )");
  60           }
  61  
  62           /* *
  63            *  @throws j ava.lang.E xception
  64            * /
  65           @A fterClass
  66           pu blic stati c void tea rDownAfter Class() th rows Excep tion {
  67                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin tearD ownAfterCl ass()");
  68                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd tearDow nAfterClas s()");
  69           }
  70  
  71           /* *
  72            *  @throws j ava.lang.E xception
  73            * /
  74           @B efore
  75           pu blic void  setUp() th rows Excep tion {
  76                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin setUp ()");
  77                    
  78                    File  file = ne w File("dr ivers/IEDr iverServer .exe");
  79                    Syst em.setProp erty("webd river.ie.d river", fi le.getAbso lutePath() );
  80                    driv er = new I nternetExp lorerDrive r();
  81                    
  82                     // baseUrl  = "http:/ / SERVER : PORT /";
  83                    base Url = "htt p://localh ost:4200/" ;
  84                    driv er.manage( ).timeouts ().implici tlyWait(30 , TimeUnit .SECONDS);
  85  
  86                    goTo LoginPageA ndClickLog inButton() ;
  87                    Thre ad.sleep(5 000);
  88                    clic kSetActive Button();
  89  
  90                    sear chClaimsPa geUrl = ba seUrl + "s earch";
  91                    Thre ad.sleep(3 000);
  92                    
  93                    goTo SearchClai msPage();
  94                    
  95                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd setUp() ");
  96           }
  97           
  98           pr ivate void  clickSetA ctiveButto n() throws  Exception  {
  99                    WebE lement set ActiveButt on = drive r.findElem ent(By.id( "setActive "));
  100                    asse rtNotNull( setActiveB utton);
  101                    setA ctiveButto n.click();
  102                    // s etActiveBu tton.submi t(); // No t inside o f a "form"  element.
  103                    setA ctiveButto n.sendKeys (Keys.ENTE R);
  104           }
  105  
  106           pr ivate void  goToLogin PageAndCli ckLoginBut ton() thro ws Excepti on {
  107                    driv er.get(bas eUrl);
  108                    WebE lement log inButton =  driver.fi ndElement( By.id("log inAdminBtn "));
  109                    asse rtNotNull( loginButto n);
  110                    
  111                    // C lick the L ogin Butto n. Had to  do this as  advised b y Joshua L one
  112                    // t o get this  to work t o forward  to next pa ge.
  113                    logi nButton.cl ick();
  114                    logi nButton.su bmit();
  115                    logi nButton.se ndKeys(Key s.ENTER);
  116           }
  117           
  118           //  Below did  not work  when using  the "http :// SERVER : PORT /" URL.
  119           pr ivate void  goToSearc hClaimsPag e() throws  Exception  {
  120                    
  121                    driv er.get(sea rchClaimsP ageUrl);
  122                    Thre ad.sleep(3 000);
  123                    
  124                    WebE lement pag eTitleElem ent = driv er.findEle ment(By.id ("pageTitl e"));
  125                    asse rtNotNull( pageTitleE lement);
  126                    
  127                    asse rtEquals(" Incorrect  Page Title  for Claim s Search P age!", 
  128                                      "Claims  Search", p ageTitleEl ement.getT ext());
  129           }
  130           
  131           //  Below doe s not seem  to work a t all now.  Do not kn ow why!
  132           pr ivate void  goToSearc hClaimsPag eViaDropDo wnMenuOpti ons() thro ws Excepti on {
  133                    List <WebElemen t> dropDow nParentEle mentsList  = driver.f indElement s(By.class Name("drop down-paren t"));
  134                    asse rtNotNull( dropDownPa rentElemen tsList);
  135                    asse rtTrue("Fa iled to fi nd any ele ments with  class equ al to 'dro pdown-pare nt'", drop DownParent ElementsLi st.size()  > 0);
  136                    
  137                    bool ean claims DropDownPa rentElemen tFound = f alse;
  138                    for  (int i = 0 ; i < drop DownParent ElementsLi st.size();  i++) {
  139                             
  140                             WebEle ment dropD ownParentE lement = d ropDownPar entElement sList.get( i);
  141                             assert NotNull(dr opDownPare ntElement) ;
  142                             
  143                             WebEle ment aElem ent = drop DownParent Element.fi ndElement( By.tagName ("a"));
  144                             assert NotNull("N o 'a' elem ent was fo und under  a Drop Dow n Parent E lement!",  aElement);
  145                             
  146                             if ( " Claims".eq uals(aElem ent.getTex t()) ) {
  147                                      claimsDr opDownPare ntElementF ound = tru e;
  148                                      
  149                                      System.o ut.println ("   Claim s a elemen t = " + aE lement);
  150                                      
  151                                      // Click  on the Cl aims Paren t Drop Dow n Parent E lement
  152                                      aElement .click();
  153                                      Thread.s leep(2000) ;
  154                                      
  155                                      // WebEl ement clai msDropDown ShowElemen t = dropDo wnParentEl ement.find Element(By .id("claim s"));
  156                                      // WebEl ement clai msDropDown ShowElemen t = dropDo wnParentEl ement.find Element(By .className ("dropdown "));
  157                                      WebEleme nt claimsD ropDownSho wElement =  dropDownP arentEleme nt.findEle ment(By.id ("claims") );
  158                                      System.o ut.println ("   claim sDropDownS howElement  = " + cla imsDropDow nShowEleme nt);
  159                                      assertNo tNull("No  'Claims' D rop Down S how Elemen t found un der the 'C laims' Dro p Down Par ent Elemen t!", claim sDropDownS howElement );
  160                                      
  161                                      System.o ut.println ("   claim sDropDownS howElement  = " + cla imsDropDow nShowEleme nt);
  162                                      
  163                                      WebEleme nt searchC laims_aEle ment = cla imsDropDow nShowEleme nt.findEle ment(By.li nkText("Se arch Claim s"));
  164                                      assertNo tNull("No  'Search Cl aims' A Ta g Element  Found!", s earchClaim s_aElement );
  165                                      
  166                                      // Click  on the "S earch Clai ms" Option  to bring  up the "Se arch Claim s" page.
  167                                      searchCl aims_aElem ent.click( );
  168                                      Thread.s leep(3000) ;
  169                                      
  170                                      WebEleme nt pageTit leElement  = driver.f indElement (By.id("pa geTitle")) ;
  171                                      assertNo tNull(page TitleEleme nt);
  172                                      
  173                                      assertEq uals("Inco rrect Page  Title for  Search Cl aims Page! ", 
  174                                                       "C laims Sear ch", pageT itleElemen t.getText( ));
  175                                      
  176                                      break;
  177                             }
  178                    }
  179                    
  180                    if ( !claimsDro pDownParen tElementFo und) {
  181                             fail(" No 'Claims  Drop Down  Parent Me nu Found!' ");
  182                    }                 
  183           }
  184           
  185           pr ivate void  rerouteCl aimsPageAp pearsGoing ThroughSea rchClaimsP age() thro ws Excepti on {
  186                    // S hould be i n Search C laims Page  by now.
  187                    
  188                    WebE lement cla imIdInputT extElement  = driver. findElemen t(By.id("c laimId"));
  189                    clai mIdInputTe xtElement. sendKeys(" 1009");
  190                    Thre ad.sleep(3 000);
  191                    
  192                    WebE lement sea rchButtonE lement = d river.find Element(By .id("searc h"));
  193                    sear chButtonEl ement.clic k();
  194                    Thre ad.sleep(5 000);
  195                    
  196                    WebE lement row CheckBoxEl ement = dr iver.findE lement(By. id("checkB ox0"));
  197                    rowC heckBoxEle ment.click ();
  198                    Thre ad.sleep(3 000);
  199                    
  200                    WebE lement rer outeButton Element =  driver.fin dElement(B y.id("lowe rReroute") );
  201                    rero uteButtonE lement.cli ck();
  202                    Thre ad.sleep(3 000);              
  203                    
  204                    // S hould be a t Reroute  Page by no w...
  205  
  206                    WebE lement pag eTitleElem ent = driv er.findEle ment(By.id ("pageTitl e"));
  207                    asse rtNotNull( pageTitleE lement);
  208                    
  209                    asse rtEquals(" Incorrect  Page Title  for Rerou te Page!",  
  210                                      "Reroute ", pageTit leElement. getText()) ;
  211           }
  212           
  213           pr ivate void  rerouteCl aimsPageAp pearsGoing ThroughSea rchClaimsP age_nonRou ted() thro ws Excepti on {
  214                    // S hould be i n Search C laims Page  by now.
  215                    
  216                    Sele ct claimTy peSelectDr opdownElem nent = new  Select(dr iver.findE lement(By. name("clai mType")));
  217                    asse rtNotNull( claimTypeS electDropd ownElemnen t);
  218                    clai mTypeSelec tDropdownE lemnent.se lectByValu e("");
  219                    
  220                    Sele ct claimSt atusSelect DropdownEl emnent = n ew Select( driver.fin dElement(B y.name("cl aimStatus" )));
  221                    asse rtNotNull( claimStatu sSelectDro pdownElemn ent);
  222                    clai mStatusSel ectDropdow nElemnent. selectByVa lue("");
  223                    
  224                    WebE lement cla imIdInputT extElement  = driver. findElemen t(By.id("c laimId"));
  225                    clai mIdInputTe xtElement. sendKeys(" 100");
  226                    Thre ad.sleep(3 000);
  227                    
  228                    WebE lement sea rchButtonE lement = d river.find Element(By .id("searc h"));
  229                    sear chButtonEl ement.clic k();
  230                    Thre ad.sleep(5 000);
  231                    
  232                    WebE lement row CheckBoxEl ement = dr iver.findE lement(By. id("checkB ox0"));
  233                    rowC heckBoxEle ment.click ();
  234                    Thre ad.sleep(3 000);
  235                    
  236                    WebE lement rer outeButton Element =  driver.fin dElement(B y.id("lowe rReroute") );
  237                    rero uteButtonE lement.cli ck();
  238                    Thre ad.sleep(3 000);              
  239                    
  240                    // S hould be a t Reroute  Page by no w...
  241  
  242                    WebE lement pag eTitleElem ent = driv er.findEle ment(By.id ("pageTitl e"));
  243                    asse rtNotNull( pageTitleE lement);
  244                    
  245                    asse rtEquals(" Incorrect  Page Title  for Rerou te Page!",  
  246                                      "Reroute ", pageTit leElement. getText()) ;
  247           }
  248  
  249           /* *
  250            *  @throws j ava.lang.E xception
  251            * /
  252           @A fter
  253           pu blic void  tearDown()  throws Ex ception {
  254                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin tearD own()");
  255                    
  256                    Thre ad.sleep(5 000);
  257                    driv er.close() ;
  258                    driv er.quit();
  259                    Thre ad.sleep(5 000);
  260                    Syst em.out.pri ntln("End  Executing  'tearDown'  method");
  261                    
  262                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd tearDow n()");
  263           }
  264           
  265           @T est
  266           pu blic void  test_1_Rer outeClaims PageAppear sGoingThro ughSearchC laimsPage( ) throws E xception {
  267                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 1_RerouteC laimsPageA ppearsGoin gThroughSe archClaims Page()");
  268                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  269                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_1_ RerouteCla imsPageApp earsGoingT hroughSear chClaimsPa ge()");
  270           }
  271           
  272           @T est
  273           pu blic void  test_2_Ver ifyNewVisn CanBeSelec tedFromRer outeClaimP age() thro ws Excepti on {
  274                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 2_VerifyNe wVisnCanBe SelectedFr omRerouteC laimPage() ");
  275                    
  276                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  277                    
  278                    Sele ct visnSel ectDropdow nElemnent  = new Sele ct(driver. findElemen t(By.name( "visnSelec t")));
  279                    asse rtNotNull( visnSelect DropdownEl emnent);
  280                    visn SelectDrop downElemne nt.selectB yValue("16 ");
  281                    Thre ad.sleep(3 000);
  282                    
  283                    WebE lement sel ectedOptio n = visnSe lectDropdo wnElemnent .getFirstS electedOpt ion();
  284                    asse rtEquals(" VISN Selec ted Value  waa not Se t properly !", "VISN  - 16", sel ectedOptio n.getText( ));
  285                    
  286                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_2_ VerifyNewV isnCanBeSe lectedFrom RerouteCla imPage()") ;
  287           }
  288           
  289           
  290           @T est
  291           pu blic void  test_3_cla imsSummary TableFunct ionality()  throws Ex ception {
  292                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 3_claimsSu mmaryTable Functional ity()");
  293                    
  294   //               driv er.get(sea rchClaimsP ageUrl);
  295   //               Thre ad.sleep(3 000);
  296   //               
  297   //               WebE lement cla imId = dri ver.findEl ement(By.i d("claimId "));
  298   //               clai mId.sendKe ys("1009") ;
  299   //               driv er.findEle ment(By.id ("search") ).click();
  300   //               Thre ad.sleep(1 000);
  301   //
  302   //               WebE lement che ckbox = dr iver.findE lement(By. id("checkB ox0"));
  303   //               chec kbox.click ();
  304   //               Thre ad.sleep(1 000);
  305   //
  306   //               WebE lement rer oute = dri ver.findEl ement(By.i d("lowerRe route"));
  307   //               rero ute.click( );
  308                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  309                    
  310                    WebE lement cla imsSummary Table = dr iver.findE lement(By. id("claims SummaryTab le"));
  311                    asse rtNotNull( claimsSumm aryTable);
  312                    
  313                    WebE lement cla imId = cla imsSummary Table.find Element(By .id("claim Id"));
  314                    WebE lement vet eranName =  claimsSum maryTable. findElemen t(By.id("v eteranName "));
  315                    WebE lement pro viderName  = claimsSu mmaryTable .findEleme nt(By.id(" providerNa me"));
  316                    asse rtTrue(cla imId != nu ll);
  317                    asse rtTrue(vet eranName ! =null);
  318                    asse rtTrue(pro viderName  != null);                 
  319                    
  320                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_3_ claimsSumm aryTableFu nctionalit y()");
  321           }
  322           
  323           @T est
  324           pu blic void  test_4_sel ectFacilit y() throws  Exception  {
  325                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 4_selectFa cility()") ;
  326                    
  327                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  328  
  329                    Sele ct dropdow n = new Se lect(drive r.findElem ent(By.id( "visnSelec t")));
  330                    asse rtNotNull( dropdown);
  331                    drop down.selec tByValue(" 16");
  332                    Sele ct facilit yDropdown  = new Sele ct(driver. findElemen t(By.id("f acilitySel ect")));
  333                    asse rtNotNull( facilityDr opdown);
  334                    faci lityDropdo wn.selectB yVisibleTe xt("21");
  335                    
  336                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_4_ selectFaci lity()");
  337           }
  338  
  339           //  587648
  340           @T est
  341           pu blic void  test_5_sel ectReasonN ame() thro ws Excepti on {
  342                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 6_selectRe asonName() ");
  343                    
  344                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  345                    Thre ad.sleep(1 000);
  346                    
  347                    Sele ct reasonD ropdown =  new Select (driver.fi ndElement( By.id("rea son")));
  348                    asse rtNotNull( reasonDrop down);
  349                    reas onDropdown .selectByV isibleText ("1 - Serv ices were  authorized  by anothe r VA facil ity");
  350                    
  351                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_6_ selectReas onName()") ;
  352           }
  353           
  354           //  Task: 595 645  --- U ser Story:  542902
  355           @T est
  356           pu blic void  test_6_ver ifyComment TextFieldE xists() th rows Excep tion {
  357                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 6_verifyCo mmentTextF ieldExists ()");
  358                    
  359                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  360                    Thre ad.sleep(1 000);
  361                    
  362                    WebE lement com ments = dr iver.findE lement(By. id("commen ts"));
  363                    asse rtNotNull( comments);
  364                    
  365                    Stri ng tagName  = comment s.getTagNa me();
  366                    asse rtEquals(" Incorrect  tag name f or the 'co mments' el ement!", 
  367                                      "textare a", tagNam e);
  368                    
  369                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_6_ verifyComm entTextFie ldExists() ");          
  370           }
  371           
  372           //  Task: 595 645  --- U ser Story:  542902
  373           @T est
  374           pu blic void  test_7_ver ifyTextCan BeEnteredI nCommentTe xtField()  throws Exc eption {
  375                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 7_verifyTe xtCanBeEnt eredInComm entTextFie ld()");
  376                    
  377                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  378                    Thre ad.sleep(1 000);
  379                    
  380                    WebE lement com ments = dr iver.findE lement(By. id("commen ts"));
  381                    asse rtNotNull( comments);
  382                    
  383                    Stri ng textEnt ered = "Th e cat is i n the hat! ";
  384                    comm ents.sendK eys(textEn tered);
  385                    Thre ad.sleep(1 000);
  386                    
  387                    asse rtEquals(" Text enter ed in Comm ents Text  Field must  equal the  Text Valu e!", textE ntered, co mments.get Text());
  388                    
  389                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_7_ verifyText CanBeEnter edInCommen tTextField ()");              
  390           }
  391           
  392           //  Task: 595 724  ----  User Story : 542906
  393           @T est
  394           pu blic void  test_8_ver ifyReroute ClaimHisto ryLabelExi sts() thro ws Excepti on {
  395                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 8_verifyRe routeClaim HistoryLab elExists() ");
  396                    
  397                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  398                    Thre ad.sleep(1 000);
  399                    
  400                    WebE lement rer outeHistor yLabel = d river.find Element(By .id("rerou teHistoryL abel"));
  401                    asse rtNotNull( rerouteHis toryLabel) ;
  402                    
  403                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_8_ verifyRero uteClaimHi storyLabel Exists()") ;         
  404           }
  405           
  406           //  Task: 595 724  ----  User Story : 542906
  407           @T est
  408           pu blic void  test_9_ver ifyReroute HistorySec tionExists () throws  Exception  {
  409                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 9_verifyRe routeHisto rySectionE xists()");
  410                    
  411                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  412                    Thre ad.sleep(1 000);
  413                    
  414                    WebE lement rer outeHistor ySection =  driver.fi ndElement( By.id("rer outeHistor ySection") );
  415                    asse rtNotNull( rerouteHis torySectio n);
  416                    
  417                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_9_ verifyRero uteHistory SectionExi sts()");             
  418           }
  419           
  420           //  Task: 595 724  ----  User Story : 542906
  421           @T est
  422           pu blic void  test_10_ve rifyCorrec tRerouteHi storyTitle Exists() t hrows Exce ption {
  423                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 10_verifyC orrectRero uteHistory TitleExist s()");
  424                    
  425                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  426                    Thre ad.sleep(1 000);
  427                    
  428                    WebE lement rer outeHistor yTitle = d river.find Element(By .id("claim RerouteHis toryTitle1 009"));
  429                    asse rtNotNull( rerouteHis toryTitle) ;
  430                    asse rtEquals(" Incorrect  Reroute Hi story Titl e for Clai m 1009!",  "Claim 100 9", rerout eHistoryTi tle.getTex t());
  431                    
  432                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_10 _verifyCor rectRerout eHistoryTi tleExists( )");               
  433           }
  434           
  435           //  Task: 595 724  ----  User Story : 542906
  436           @T est
  437           pu blic void  test_11_ve rifyCorrec tRerouteHi storyTable ExistsWith CorrectCol umnRows()  throws Exc eption {
  438                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 11_verifyC orrectRero uteHistory TableExist sWithCorre ctColumnRo ws()");
  439                    
  440                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  441                    Thre ad.sleep(1 000);
  442                    
  443                    WebE lement rer outeHistor yTable = d river.find Element(By .id("claim RerouteHis toryTable1 009"));
  444                    asse rtNotNull( rerouteHis toryTable) ;
  445                    
  446                    List <WebElemen t> reroute HistoryTab leRows = r erouteHist oryTable.f indElement s(By.id("c laimRerout eHistoryTa bleRowData "));
  447                    asse rtTrue("Sh ould have  1 or more  rows of Cl aim Histor y Data", r erouteHist oryTableRo ws.size()  > 0);
  448                    
  449                    for  ( WebEleme nt reroute HistoryTab leRow:  re routeHisto ryTableRow s ) {
  450                             WebEle ment dateC laimRerout eHistoryTa bleData =  rerouteHis toryTableR ow.findEle ment(By.id ("dateClai mRerouteHi storyTable Data"));
  451                             assert NotNull(da teClaimRer outeHistor yTableData );
  452                             
  453                             WebEle ment reaso nClaimRero uteHistory TableData  = rerouteH istoryTabl eRow.findE lement(By. id("reason ClaimRerou teHistoryT ableData") );
  454                             assert NotNull(re asonClaimR erouteHist oryTableDa ta);
  455                             
  456                             WebEle ment expla nationClai mRerouteHi storyTable Data = rer outeHistor yTableRow. findElemen t(By.id("e xplanation ClaimRerou teHistoryT ableData") );
  457                             assert NotNull(ex planationC laimRerout eHistoryTa bleData);
  458                             
  459                             WebEle ment trans ferredToCl aimReroute HistoryTab leData = r erouteHist oryTableRo w.findElem ent(By.id( "transferr edToClaimR erouteHist oryTableDa ta"));
  460                             assert NotNull(tr ansferredT oClaimRero uteHistory TableData) ;
  461                             
  462                             WebEle ment trans ferredFrom ClaimRerou teHistoryT ableData =  rerouteHi storyTable Row.findEl ement(By.i d("transfe rredFromCl aimReroute HistoryTab leData"));
  463                             assert NotNull(tr ansferredF romClaimRe routeHisto ryTableDat a);
  464                             
  465                             WebEle ment trans ferredByCl aimReroute HistoryTab leData = r erouteHist oryTableRo w.findElem ent(By.id( "transferr edByClaimR erouteHist oryTableDa ta"));
  466                             assert NotNull(tr ansferredB yClaimRero uteHistory TableData) ;
  467                    }
  468                    
  469                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_11 _verifyCor rectRerout eHistoryTa bleExistsW ithCorrect ColumnRows ()");          
  470           }
  471           
  472           //  Task: 595 724  ----  User Story : 542906
  473           @T est
  474           pu blic void  test_11_ve rifyNonRou tedExistsW henClaimCa nnotBeRout ed() throw s Exceptio n {
  475                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 11_verifyN onRoutedEx istsWhenCl aimCannotB eRouted()" );
  476                    
  477                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage_n onRouted() ;
  478                    Thre ad.sleep(1 000);
  479                    
  480                    WebE lement non RoutedMess age = driv er.findEle ment(By.id ("nonRoute dMessage") );
  481                    asse rtNotNull( nonRoutedM essage);
  482                    asse rtTrue("No n Routed M essage sho uld not be  an empty  string!",  nonRoutedM essage.get Text().len gth() > 0) ;
  483                    
  484                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_11 _verifyNon RoutedExis tsWhenClai mCannotBeR outed()");                  
  485           }
  486           
  487           //  Unable to  Test for  situation  where a Cl aim has no  Claim His tory, beca use I do n ot know wh ich claim
  488           //  has no Cl aim Histor y.
  489           
  490           //  Task: 595 724  ----  User Story : 542906
  491           @T est
  492           pu blic void  test_12_ve rifyRerout eButtonExi stsAndIsIn itiallyDis abled() th rows Excep tion {
  493                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 12_verifyR erouteButt onExistsAn dIsInitial lyDisabled ()");
  494                    
  495                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  496                    Thre ad.sleep(1 000);
  497                    
  498                    WebE lement rer outeButton  = driver. findElemen t(By.id("s ubmit"));
  499                    asse rtNotNull( rerouteBut ton);
  500                    asse rtEquals(" Incorrect  Label for  Reroute Bu tton!", "R eroute", r erouteButt on.getText ());
  501                    
  502                    Stri ng disable dAttribute  = reroute Button.get Attribute( "disabled" );
  503                    asse rtNotNull( disabledAt tribute);
  504                    
  505                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_12 _verifyRer outeButton ExistsAndI sInitially Disabled() ");              
  506           }
  507           
  508           //  Task: 595 724  ----  User Story : 542906
  509           @T est
  510           pu blic void  test_13_ve rifyRerout eButtonIsE nabledOnly WhenVisnFa cilityAndR easonValue sAreEntere d() throws  Exception  {
  511                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 13_verifyR erouteButt onIsEnable dOnlyWhenV isnFacilit yAndReason ValuesAreE ntered()") ;
  512                    
  513                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  514                    Thre ad.sleep(1 000);
  515                    
  516                    WebE lement rer outeButton  = driver. findElemen t(By.id("s ubmit"));
  517                    asse rtNotNull( rerouteBut ton);
  518                    asse rtEquals(" Incorrect  Label for  Reroute Bu tton!", "R eroute", r erouteButt on.getText ());
  519                    
  520                    Stri ng disable dAttribute  = reroute Button.get Attribute( "disabled" );
  521                    asse rtNotNull( disabledAt tribute);
  522                    
  523                    Sele ct visnSel ectDropdow nElement =  new Selec t(driver.f indElement (By.name(" visnSelect ")));
  524                    asse rtNotNull( visnSelect DropdownEl ement);
  525                    visn SelectDrop downElemen t.selectBy Value("16" );
  526                    Thre ad.sleep(2 000);
  527                    
  528                    disa bledAttrib ute = rero uteButton. getAttribu te("disabl ed");
  529                    asse rtNotNull( disabledAt tribute);
  530                    
  531                    Sele ct facilit yDropdown  = new Sele ct(driver. findElemen t(By.id("f acilitySel ect")));
  532                    asse rtNotNull( facilityDr opdown);
  533                    faci lityDropdo wn.selectB yVisibleTe xt("21");
  534                    Thre ad.sleep(2 000);
  535                    
  536                    disa bledAttrib ute = rero uteButton. getAttribu te("disabl ed");
  537                    asse rtNotNull( disabledAt tribute);
  538                    
  539                    Sele ct reasonD ropdown =  new Select (driver.fi ndElement( By.id("rea son")));
  540                    asse rtNotNull( reasonDrop down);
  541                    reas onDropdown .selectByV alue("1");       
  542                    Thre ad.sleep(2 000);
  543                    
  544                    // R eroute But ton should  be enable d by now.
  545                    disa bledAttrib ute = rero uteButton. getAttribu te("disabl ed");
  546                    asse rtNull(dis abledAttri bute);           
  547                    
  548                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_13 _verifyRer outeButton IsEnabledO nlyWhenVis nFacilityA ndReasonVa luesAreEnt ered()");            
  549           }
  550           
  551           //  Task: 595 724  ----  User Story : 542906
  552           @T est
  553           pu blic void  test_14_ve rifyWhenRe routeButto nIsClicked AndRoutesS uccessfull y() throws  Exception  {
  554                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: B egin test_ 14_verifyW henReroute ButtonIsCl ickedAndRo utesSucces sfully()") ;
  555                    
  556                    rero uteClaimsP ageAppears GoingThrou ghSearchCl aimsPage() ;
  557                    Thre ad.sleep(1 000);
  558                    
  559                    WebE lement rer outeButton  = driver. findElemen t(By.id("s ubmit"));
  560                    asse rtNotNull( rerouteBut ton);
  561                    asse rtEquals(" Incorrect  Label for  Reroute Bu tton!", "R eroute", r erouteButt on.getText ());
  562                    
  563                    Stri ng disable dAttribute  = reroute Button.get Attribute( "disabled" );
  564                    asse rtNotNull( disabledAt tribute);
  565                    
  566                    Sele ct visnSel ectDropdow nElement =  new Selec t(driver.f indElement (By.name(" visnSelect ")));
  567                    asse rtNotNull( visnSelect DropdownEl ement);
  568                    visn SelectDrop downElemen t.selectBy Value("16" );
  569                    Thre ad.sleep(2 000);
  570                    
  571                    disa bledAttrib ute = rero uteButton. getAttribu te("disabl ed");
  572                    asse rtNotNull( disabledAt tribute);
  573                    
  574                    Sele ct facilit yDropdown  = new Sele ct(driver. findElemen t(By.id("f acilitySel ect")));
  575                    asse rtNotNull( facilityDr opdown);
  576                    faci lityDropdo wn.selectB yVisibleTe xt("21");
  577                    Thre ad.sleep(2 000);
  578                    
  579                    disa bledAttrib ute = rero uteButton. getAttribu te("disabl ed");
  580                    asse rtNotNull( disabledAt tribute);
  581                    
  582                    Sele ct reasonD ropdown =  new Select (driver.fi ndElement( By.id("rea son")));
  583                    asse rtNotNull( reasonDrop down);
  584                    reas onDropdown .selectByV alue("1");       
  585                    
  586                    WebE lement com ments = dr iver.findE lement(By. id("commen ts"));
  587                    asse rtNotNull( comments);
  588                    
  589                    Stri ng textEnt ered = "Th e cat is i n the hat! ";
  590                    comm ents.sendK eys(textEn tered);          
  591                    
  592                    Thre ad.sleep(2 000);
  593                    
  594                    // R eroute But ton should  be enable d by now.
  595                    disa bledAttrib ute = rero uteButton. getAttribu te("disabl ed");
  596                    asse rtNull(dis abledAttri bute);           
  597                    Thre ad.sleep(1 000);
  598                    
  599                    // C lick on th e Reroute  Button.
  600                    rero uteButton. click();
  601                    // r erouteButt on.sendKey s(Keys.ENT ER);
  602                    Thre ad.sleep(3 000);
  603                    
  604                    // V erify that  a Success ful Rerout e Message  is display ed.
  605                    WebE lement suc cessfulRer outeElemen t = driver .findEleme nt(By.id(" successful RerouteMes sage"));
  606                    asse rtNotNull( successful RerouteEle ment);
  607                    
  608                    asse rtTrue("Le ngth of Su ccessful R oute Messa ge must be  greater t han 0!", s uccessfulR erouteElem ent.getTex t().length () > 0 );
  609                    
  610                    Syst em.out.pri ntln("Rero uteClaimsP ageTest: E nd test_14 _verifyWhe nRerouteBu ttonIsClic kedAndRout esSuccessf ully()");                 
  611           }
  612   }