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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | PC_CP4_CiF.zip\FPPS_Frontend\fpps-app\Testing\src\testing | StationMaintenanceAddZipCodeTest_SaveCancelButtons.java | Fri Dec 8 17:53:04 2017 UTC |
| 2 | PC_CP4_CiF.zip\FPPS_Frontend\fpps-app\Testing\src\testing | StationMaintenanceAddZipCodeTest_SaveCancelButtons.java | Fri Dec 8 19:18:49 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 718 |
| Changed | 2 | 6 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | package te sting; | |
| 2 | ||
| 3 | import sta tic org.ju nit.Assert .*; | |
| 4 | ||
| 5 | import jav a.io.File; | |
| 6 | import jav a.util.Lis t; | |
| 7 | import jav a.util.con current.Ti meUnit; | |
| 8 | ||
| 9 | import org .junit.Aft er; | |
| 10 | import org .junit.Aft erClass; | |
| 11 | import org .junit.Bef ore; | |
| 12 | import org .junit.Bef oreClass; | |
| 13 | import org .junit.Fix MethodOrde r; | |
| 14 | import org .junit.run ners.Metho dSorters; | |
| 15 | import org .junit.Tes t; | |
| 16 | import org .junit.int ernal.Text Listener; | |
| 17 | import org .junit.run ner.JUnitC ore; | |
| 18 | import org .junit.run ner.Result ; | |
| 19 | import org .openqa.se lenium.By; | |
| 20 | import org .openqa.se lenium.Key s; | |
| 21 | import org .openqa.se lenium.NoS uchElement Exception; | |
| 22 | import org .openqa.se lenium.Web Driver; | |
| 23 | import org .openqa.se lenium.Web Element; | |
| 24 | import org .openqa.se lenium.ie. InternetEx plorerDriv er; | |
| 25 | import org .openqa.se lenium.sup port.ui.Se lect; | |
| 26 | ||
| 27 | /** | |
| 28 | * @author DN S PEREZF | |
| 29 | * | |
| 30 | */ | |
| 31 | @FixMethod Order(Meth odSorters. NAME_ASCEN DING) | |
| 32 | public cla ss Station Maintenanc eAddZipCod eTest_Save CancelButt ons { | |
| 33 | ||
| 34 | pr ivate WebD river driv er; | |
| 35 | pr ivate Stri ng baseUrl ; | |
| 36 | pr ivate Stri ng searchS tationPage Url; | |
| 37 | ||
| 38 | pu blic stati c void mai n(String a rgs[]) { | |
| 39 | JUni tCore juni t = new JU nitCore(); | |
| 40 | juni t.addListe ner(new Te xtListener (System.ou t)); | |
| 41 | Resu lt result = junit.ru n(StationM aintenance AddZipCode Test_SaveC ancelButto ns.class); // Replac e "SampleT est" with the name o f your cla ss | |
| 42 | if ( result.get FailureCou nt() > 0) { | |
| 43 | System.out .println(" Test faile d.\n" + re sult); | |
| 44 | System.exi t(1); | |
| 45 | } el se { | |
| 46 | System.out .println(" Test finis hed succes sfully."); | |
| 47 | System.exi t(0); | |
| 48 | } | |
| 49 | } | |
| 50 | ||
| 51 | /* * | |
| 52 | * @throws j ava.lang.E xception | |
| 53 | * / | |
| 54 | @B eforeClass | |
| 55 | pu blic stati c void set UpBeforeCl ass() thro ws Excepti on { | |
| 56 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Be gin setUpB eforeClass ()"); | |
| 57 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: En d setUpBef oreClass() "); | |
| 58 | } | |
| 59 | ||
| 60 | /* * | |
| 61 | * @throws j ava.lang.E xception | |
| 62 | * / | |
| 63 | @A fterClass | |
| 64 | pu blic stati c void tea rDownAfter Class() th rows Excep tion { | |
| 65 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Be gin tearDo wnAfterCla ss()"); | |
| 66 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: En d tearDown AfterClass ()"); | |
| 67 | } | |
| 68 | ||
| 69 | /* * | |
| 70 | * @throws j ava.lang.E xception | |
| 71 | * / | |
| 72 | @B efore | |
| 73 | pu blic void setUp() th rows Excep tion { | |
| 74 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Be gin setUp( )"); | |
| 75 | ||
| 76 | File file = ne w File("dr ivers/IEDr iverServer .exe"); | |
| 77 | Syst em.setProp erty("webd river.ie.d river", fi le.getAbso lutePath() ); | |
| 78 | driv er = new I nternetExp lorerDrive r(); | |
| 79 | ||
| 80 | // baseUrl = "http:/ / SERVER : PORT /"; | |
| 81 | baseUrl = "http://lo calhost: PORT /"; | |
| 82 | driv er.manage( ).timeouts ().implici tlyWait(30 , TimeUnit .SECONDS); | |
| 83 | ||
| 84 | goTo LoginPageA ndClickLog inButton() ; | |
| 85 | Thre ad.sleep(5 000); | |
| 86 | clic kSetActive Button(); | |
| 87 | ||
| 88 | // G o to the S earch Stat ion Page. | |
| 89 | sear chStationP ageUrl = b aseUrl + " searchStat ion"; | |
| 90 | driv er.get(sea rchStation PageUrl); | |
| 91 | Thre ad.sleep(5 000); | |
| 92 | ||
| 93 | // V erify that it is the Search St ation Page . | |
| 94 | WebE lement pag eTitleElem ent = driv er.findEle ment(By.id ("pageTitl e")); | |
| 95 | asse rtNotNull( pageTitleE lement); | |
| 96 | asse rtEquals(" Incorrect Page Title for Searc h Station Page!", | |
| 97 | "Station Maintenan ce | Sea rch Statio ns", pageT itleElemen t.getText( )); | |
| 98 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Ve rified we are in the Search St ation Page !"); | |
| 99 | ||
| 100 | // G et access to the Mod ify button of intere st... | |
| 101 | WebE lement dat aTableElem ent = driv er.findEle ment(By.id ("datatabl e")); | |
| 102 | asse rtNotNull( dataTableE lement); | |
| 103 | WebE lement mod ifyTdEleme nt = dataT ableElemen t.findElem ent(By.id( "edit2")); | |
| 104 | asse rtNotNull( modifyTdEl ement); | |
| 105 | WebE lement mod ifyButtonE lement = m odifyTdEle ment.findE lement(By. tagName("b utton")); | |
| 106 | asse rtNotNull( modifyButt onElement) ; | |
| 107 | ||
| 108 | // C lick on th e Modify B utton | |
| 109 | modi fyButtonEl ement.clic k(); | |
| 110 | // m odifyButto nElement.s endKeys(Ke ys.ENTER); | |
| 111 | Thre ad.sleep(5 000); | |
| 112 | ||
| 113 | // V erify that we are no w in the " Station Ma intenance | Edit" Pa ge. | |
| 114 | page TitleEleme nt = drive r.findElem ent(By.id( "pageTitle ")); | |
| 115 | asse rtNotNull( pageTitleE lement); | |
| 116 | asse rtEquals(" Incorrect Page Title for Stati on Mainten ance Edit Page!", | |
| 117 | "Station Maintenan ce | Edi t", pageTi tleElement .getText() ); | |
| 118 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Ve rified we are in the Station M aintenance Edit Page !"); | |
| 119 | ||
| 120 | // C lick on th e ZIP Code s Tab Elem ent | |
| 121 | WebE lement zip CodeTabEle ment = dri ver.findEl ement(By.i d("tab2")) ; | |
| 122 | zipC odeTabElem ent.click( ); | |
| 123 | Thre ad.sleep(2 000); | |
| 124 | WebE lement add ZipCodeEle ment = dri ver.findEl ement(By.i d("addZipC ode")); | |
| 125 | addZ ipCodeElem ent.click( ); | |
| 126 | Thre ad.sleep(5 000); | |
| 127 | ||
| 128 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: En d setUp()" ); | |
| 129 | } | |
| 130 | ||
| 131 | pr ivate void clickSetA ctiveButto n() throws Exception { | |
| 132 | WebE lement set ActiveButt on = drive r.findElem ent(By.id( "setActive ")); | |
| 133 | asse rtNotNull( setActiveB utton); | |
| 134 | setA ctiveButto n.click(); | |
| 135 | // s etActiveBu tton.submi t(); // No t inside o f a "form" element. | |
| 136 | setA ctiveButto n.sendKeys (Keys.ENTE R); | |
| 137 | Thre ad.sleep(3 000); | |
| 138 | } | |
| 139 | ||
| 140 | pr ivate void goToLogin PageAndCli ckLoginBut ton() thro ws Excepti on { | |
| 141 | driv er.get(bas eUrl); | |
| 142 | WebE lement log inButton = driver.fi ndElement( By.id("log inAdminBtn ")); | |
| 143 | asse rtNotNull( loginButto n); | |
| 144 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Lo gin Button exists!") ; | |
| 145 | ||
| 146 | // S elect the ADMIN Role . | |
| 147 | Sele ct roleSel ectBox = n ew Select( driver.fin dElement(B y.id("sele ctRole2")) ); | |
| 148 | asse rtNotNull( roleSelect Box); | |
| 149 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Ro le Select Box exists !"); | |
| 150 | role SelectBox. selectByVi sibleText( "ADMIN"); | |
| 151 | Thre ad.sleep(2 000); | |
| 152 | ||
| 153 | // C lick the L ogin Butto n. Had to do this as advised b y Joshua L one | |
| 154 | // t o get this to work t o forward to next pa ge. | |
| 155 | logi nButton.cl ick(); | |
| 156 | logi nButton.su bmit(); | |
| 157 | logi nButton.se ndKeys(Key s.ENTER); | |
| 158 | } | |
| 159 | ||
| 160 | /* * | |
| 161 | * @throws j ava.lang.E xception | |
| 162 | * / | |
| 163 | @A fter | |
| 164 | pu blic void tearDown() throws Ex ception { | |
| 165 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Be gin tearDo wn()"); | |
| 166 | ||
| 167 | Thre ad.sleep(5 000); | |
| 168 | driv er.close() ; | |
| 169 | driv er.quit(); | |
| 170 | Thre ad.sleep(5 000); | |
| 171 | Syst em.out.pri ntln("End Executing 'tearDown' method"); | |
| 172 | ||
| 173 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: En d tearDown ()"); | |
| 174 | } | |
| 175 | ||
| 176 | @T est | |
| 177 | pu blic void test_1_Ver ify_Statio nMaintenan ceAddZipCo dePage_App ears() thr ows Except ion { | |
| 178 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Be gin test_1 _Verify_St ationMaint enanceAddZ ipCodePage _Appears() "); | |
| 179 | ||
| 180 | WebE lement pag eTitleElem ent = driv er.findEle ment(By.id ("pageTitl e")); | |
| 181 | asse rtNotNull( pageTitleE lement); | |
| 182 | ||
| 183 | asse rtEquals(" Incorrect Page Title for Stati on Mainten ance Add Z IP Code Pa ge!", | |
| 184 | "Station Maintenan ce | Add ZIP Code" , pageTitl eElement.g etText()); | |
| 185 | ||
| 186 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: En d test_1_V erify_Stat ionMainten anceAddZip CodePage_A ppears()") ; | |
| 187 | } | |
| 188 | ||
| 189 | @T est | |
| 190 | pu blic void test_2_Ver ify_Statio nMaintenan ceCancelBu ttonExists () throws Exception { | |
| 191 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Be gin test_2 _Verify_St ationMaint enanceCanc elButtonEx ists()"); | |
| 192 | ||
| 193 | WebE lement can celButtonE lement = d river.find Element(By .id("cance l")); | |
| 194 | asse rtNotNull( cancelButt onElement) ; | |
| 195 | ||
| 196 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: En d test_2_V erify_Stat ionMainten anceCancel ButtonExis ts()"); | |
| 197 | } | |
| 198 | ||
| 199 | @T est | |
| 200 | pu blic void test_3_Ver ify_Cancel ButtonClic k_Forwards BackTo_Sta tionMainte nanceEditP age() thro ws Excepti on { | |
| 201 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Be gin test_3 _Verify_Ca ncelButton Click_Forw ardsBackTo _StationMa intenanceE ditPage()" ); | |
| 202 | ||
| 203 | WebE lement can celButtonE lement = d river.find Element(By .id("cance l")); | |
| 204 | asse rtNotNull( cancelButt onElement) ; | |
| 205 | ||
| 206 | canc elButtonEl ement.clic k(); | |
| 207 | Thre ad.sleep(3 000); | |
| 208 | ||
| 209 | WebE lement pag eTitleElem ent = driv er.findEle ment(By.id ("pageTitl e")); | |
| 210 | asse rtNotNull( pageTitleE lement); | |
| 211 | asse rtEquals(" Incorrect Page Title for Stati on Mainten ance Edit Page!", | |
| 212 | "Station Maintenan ce | Edi t", pageTi tleElement .getText() ); | |
| 213 | ||
| 214 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: En d test_3_V erify_Canc elButtonCl ick_Forwar dsBackTo_S tationMain tenanceEdi tPage()"); | |
| 215 | } | |
| 216 | ||
| 217 | @T est | |
| 218 | pu blic void test_4_Ver ify_Statio nMaintenan ceSaveButt onExists_A ndIsDisabl edInitiall y() throws Exception { | |
| 219 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Be gin test_4 _Verify_St ationMaint enanceSave ButtonExis ts_AndIsDi sabledInit ially()"); | |
| 220 | ||
| 221 | WebE lement sav eButtonEle ment = dri ver.findEl ement(By.i d("save")) ; | |
| 222 | asse rtNotNull( saveButton Element); | |
| 223 | ||
| 224 | Stri ng disable dAttribute Str = save ButtonElem ent.getAtt ribute("di sabled"); | |
| 225 | asse rtNotNull( disabledAt tributeStr ); | |
| 226 | Syst em.out.pri ntln(" d isabledAtt ributeStr = " + disa bledAttrib uteStr); | |
| 227 | asse rtEquals(" The disabl ed attribu te value o n the Save button sh ould be an empty str ing", "tru e", disabl edAttribut eStr); | |
| 228 | ||
| 229 | Stri ng classAt tributeStr = saveBut tonElement .getAttrib ute("class "); | |
| 230 | asse rtNotNull( classAttri buteStr); | |
| 231 | Syst em.out.pri ntln(" c lassAttrib uteStr = " + classAt tributeStr ); | |
| 232 | asse rtTrue("Th e class at tribute va lue on the Save butt on should contain th e disabled string", classAttri buteStr.co ntains(" d isabled")) ; | |
| 233 | ||
| 234 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: En d test_4_V erify_Stat ionMainten anceSaveBu ttonExists _AndIsDisa bledInitia lly()"); | |
| 235 | } | |
| 236 | ||
| 237 | @T est | |
| 238 | pu blic void test_5_Ver ify_Statio nMaintenan ceSaveButt onBecomesE nabledWhen NonExisten tZipCodeTe xtValueEnt ered() thr ows Except ion { | |
| 239 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Be gin test_5 _Verify_St ationMaint enanceSave ButtonBeco mesEnabled WhenNonExi stentZipCo deTextValu eEntered() "); | |
| 240 | ||
| 241 | WebE lement zip CodeTextEl ement = dr iver.findE lement(By. id("zipCod e")); | |
| 242 | asse rtNotNull( zipCodeTex tElement); | |
| 243 | ||
| 244 | zipC odeTextEle ment.sendK eys("ABC") ; | |
| 245 | ||
| 246 | WebE lement sav eButtonEle ment = dri ver.findEl ement(By.i d("save")) ; | |
| 247 | asse rtNotNull( saveButton Element); | |
| 248 | ||
| 249 | Stri ng disable dAttribute Str = save ButtonElem ent.getAtt ribute("di sabled"); | |
| 250 | asse rtNull(dis abledAttri buteStr); | |
| 251 | Syst em.out.pri ntln(" d isabledAtt ributeStr = " + disa bledAttrib uteStr); | |
| 252 | ||
| 253 | Stri ng classAt tributeStr = saveBut tonElement .getAttrib ute("class "); | |
| 254 | asse rtNotNull( classAttri buteStr); | |
| 255 | Syst em.out.pri ntln(" c lassAttrib uteStr = " + classAt tributeStr ); | |
| 256 | asse rtFalse("T he class a ttribute v alue on th e Save but ton should NOT conta in the dis abled stri ng", class AttributeS tr.contain s("disable d")); | |
| 257 | ||
| 258 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: En d test_5_V erify_Stat ionMainten anceSaveBu ttonBecome sEnabledWh enNonExist entZipCode TextValueE ntered()") ; | |
| 259 | } | |
| 260 | ||
| 261 | @T est | |
| 262 | pu blic void test_6_Ver ify_Statio nMaintenan ceSaveButt onBecomesD isabledWhe nExistentZ ipCodeText ValueEnter ed() throw s Exceptio n { | |
| 263 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Be gin test_6 _Verify_St ationMaint enanceSave ButtonBeco mesDisable dWhenExist entZipCode TextValueE ntered()") ; | |
| 264 | ||
| 265 | WebE lement zip CodeTextEl ement = dr iver.findE lement(By. id("zipCod e")); | |
| 266 | asse rtNotNull( zipCodeTex tElement); | |
| 267 | ||
| 268 | // T he below w as a ZIP C ode that w as already added for the Stati on. | |
| 269 | zipC odeTextEle ment.sendK eys("12345 "); | |
| 270 | ||
| 271 | WebE lement sav eButtonEle ment = dri ver.findEl ement(By.i d("save")) ; | |
| 272 | asse rtNotNull( saveButton Element); | |
| 273 | ||
| 274 | Thre ad.sleep(3 000); | |
| 275 | ||
| 276 | Stri ng disable dAttribute Str = save ButtonElem ent.getAtt ribute("di sabled"); | |
| 277 | Syst em.out.pri ntln(" d isabledAtt ributeStr = " + disa bledAttrib uteStr); | |
| 278 | asse rtNotNull( disabledAt tributeStr ); | |
| 279 | asse rtEquals(" The disabl ed attribu te value o n the Save button sh ould be an empty str ing", "tru e", disabl edAttribut eStr); | |
| 280 | ||
| 281 | Stri ng classAt tributeStr = saveBut tonElement .getAttrib ute("class "); | |
| 282 | asse rtNotNull( classAttri buteStr); | |
| 283 | Syst em.out.pri ntln(" c lassAttrib uteStr = " + classAt tributeStr ); | |
| 284 | asse rtTrue("Th e class at tribute va lue on the Save butt on should contain th e disabled string", classAttri buteStr.co ntains(" d isabled")) ; | |
| 285 | ||
| 286 | WebE lement zip CodeAlread yExistsErr orMessageE lement = d river.find Element(By .id("zipCo deAlreadyE xistsError Message")) ; | |
| 287 | Syst em.out.pri ntln(" z ipCodeAlre adyExistsE rrorMessag eElement = " + zipCo deAlreadyE xistsError MessageEle ment); | |
| 288 | Syst em.out.pri ntln(" z ipCodeAlre adyExistsE rrorMessag eElement ! = null: " + zipCodeA lreadyExis tsErrorMes sageElemen t != null) ; | |
| 289 | ||
| 290 | asse rtNotNull( "Should ha ve the ZIP Code Alre ady Exists Text!", z ipCodeAlre adyExistsE rrorMessag eElement); | |
| 291 | ||
| 292 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: En d test_6_V erify_Stat ionMainten anceSaveBu ttonBecome sDisabledW henExisten tZipCodeTe xtValueEnt ered()"); | |
| 293 | } | |
| 294 | ||
| 295 | @T est | |
| 296 | pu blic void test_7_Ver ify_Succes sfulZipCod eSave() th rows Excep tion { | |
| 297 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: Be gin test_7 _Verify_Su ccessfulZi pCodeSave) "); | |
| 298 | ||
| 299 | WebE lement sav eButtonEle ment = dri ver.findEl ement(By.i d("save")) ; | |
| 300 | asse rtNotNull( saveButton Element); | |
| 301 | ||
| 302 | WebE lement zip CodeTextEl ement = dr iver.findE lement(By. id("zipCod e")); | |
| 303 | asse rtNotNull( zipCodeTex tElement); | |
| 304 | ||
| 305 | // F ind a Zip Code Numbe r that is available to be adde d to the S tation. | |
| 306 | long zipCodeNu mber = 0L; | |
| 307 | for (zipCodeNu mber = 999 9999999L; zipCodeNum ber > 0; z ipCodeNumb er--) { | |
| 308 | System .out.print ln(" zip CodeNumber = " + zip CodeNumber ); | |
| 309 | ||
| 310 | zipCod eTextEleme nt.sendKey s(Long.toS tring(zipC odeNumber) ); | |
| 311 | Thread .sleep(200 0); | |
| 312 | String disabledA ttributeSt r = saveBu ttonElemen t.getAttri bute("disa bled"); | |
| 313 | System .out.print ln(" dis abledAttri buteStr = " + disabl edAttribut eStr); | |
| 314 | ||
| 315 | if (di sabledAttr ibuteStr = = null) { | |
| 316 | break; | |
| 317 | } else { | |
| 318 | // The o nly thing that worke d was "zip CodeTextEl ement.send Keys(Keys. BACK_SPACE )" | |
| 319 | // zipCo deTextElem ent.sendKe ys(Keys.DE LETE); | |
| 320 | // zipCo deTextElem ent.clear( ); | |
| 321 | for (int i = 0; i < 10; i++) { | |
| 322 | zipCodeTex tElement.s endKeys(Ke ys.BACK_SP ACE); | |
| 323 | } | |
| 324 | Thread.s leep(2000) ; | |
| 325 | } | |
| 326 | } | |
| 327 | ||
| 328 | Syst em.out.pri ntln(" z ipCodeNumb er = " + z ipCodeNumb er); | |
| 329 | ||
| 330 | WebE lement fip sCountyCod eTextEleme nt = drive r.findElem ent(By.id( "fipsCount yCode")); | |
| 331 | asse rtNotNull( fipsCounty CodeTextEl ement); | |
| 332 | fips CountyCode TextElemen t.sendKeys ("SEM"); | |
| 333 | Thre ad.sleep(1 000); | |
| 334 | ||
| 335 | WebE lement urb anIndicato rTextEleme nt = drive r.findElem ent(By.id( "urbanIndi cator")); | |
| 336 | asse rtNotNull( urbanIndic atorTextEl ement); | |
| 337 | urba nIndicator TextElemen t.sendKeys ("MIAMI"); | |
| 338 | Thre ad.sleep(1 000); | |
| 339 | ||
| 340 | WebE lement fip sStateCode TextElemen t = driver .findEleme nt(By.id(" fipsStateC ode")); | |
| 341 | asse rtNotNull( fipsStateC odeTextEle ment); | |
| 342 | fips StateCodeT extElement .sendKeys( "FL"); | |
| 343 | Thre ad.sleep(1 000); | |
| 344 | ||
| 345 | save ButtonElem ent.click( ); | |
| 346 | Thre ad.sleep(3 000); | |
| 347 | ||
| 348 | // M ake sure y ou are bac k at the " Station Ma intenance | Edit" Page. | |
| 349 | WebE lement pag eTitleElem ent = driv er.findEle ment(By.id ("pageTitl e")); | |
| 350 | asse rtNotNull( pageTitleE lement); | |
| 351 | asse rtEquals(" Incorrect Page Title for Stati on Mainten ance Edit Page!", | |
| 352 | "Station Maintenan ce | Edi t", pageTi tleElement .getText() ); | |
| 353 | ||
| 354 | WebE lement add ZipCodeSuc cessMessag eElement = driver.fi ndElement( By.id("add ZipCodeSuc cessMessag e")); | |
| 355 | asse rtNotNull( addZipCode SuccessMes sageElemen t); | |
| 356 | ||
| 357 | Syst em.out.pri ntln("Stat ionMainten anceAddZip CodeTest_S aveCancelB uttons: En d test_7_V erify_Succ essfulZipC odeSave()" ); | |
| 358 | } | |
| 359 | ||
| 360 | // Franklin Perez (10/ 24/2017): Do not kno w how to t est for fa ilure of Z IP Code Ad dition due to not kn owing | |
| 361 | // how to excite sys tem to ret urn back f ailure of Add ZIP Co de. | |
| 362 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.