def test_25_saleDetails_new(self): u"""new SaleDetails""" LandCommonPage(self.driver).switch_tab("Land Details","Sale") multiTractSaleIndicator = dbConnect().getdata( *(excelHandle(filepath, sheetName).read_excel("multiTractSaleIndicator"))) reservationEasement = dbConnect().getdata( *(excelHandle(filepath, sheetName).read_excel("reservationEasement"))) LandCommonPage(self.driver).list_operation("Land Details","Sale Details", "New", "","") self.assertTrue(LandDetailPage(self.driver).SaleDetails(multiTractSaleIndicator,reservationEasement))
def test_01_countySeat(self): u"""New/Edit CountySeat""" LandCommonPage(self.driver).switch_tab("Land Details", "Location") directionFromCountySeat = dbConnect().getdata(*(excelHandle( filepath, sheetName).read_excel("directionFromCountySeat"))) deviationFromCountySeat = dbConnect().getdata(*(excelHandle( filepath, sheetName).read_excel("deviationFromCountySeat"))) LandCommonPage(self.driver).summary_operation( "Land Details", "Location From County Seat", "Edit", "", "") self.assertTrue( LandDetailPage(self.driver).locationCountySeat( directionFromCountySeat, deviationFromCountySeat))
def test_05_characteristic(self): u"""New/Edit characteristic""" LandCommonPage(self.driver).switch_tab("Land Details", "Characteristics") improvementsIndicator = dbConnect().getdata(*(excelHandle( filepath, sheetName).read_excel("improvementsIndicator"))) utilitiesAvailableIndicator = dbConnect().getdata(*(excelHandle( filepath, sheetName).read_excel("utilitiesAvailableIndicator"))) LandCommonPage(self.driver).summary_operation("Land Details", "Characteristics", "Edit", "", "") self.assertTrue( LandDetailPage(self.driver).characteristics( improvementsIndicator, utilitiesAvailableIndicator))
def SaleDetails(self, multiTractSaleIndicator, reservationEasement): self.ctrl_all(LandCommonEntity().get_field_input("minimumBidAmount")) self.type(LandCommonEntity().get_field_input("minimumBidAmount"), BasePage(self.driver).randomData("number", 2)) self.ctrl_all( LandCommonEntity().get_field_textarea("multiTractComment")) self.type(LandCommonEntity().get_field_textarea("multiTractComment"), BasePage(self.driver).randomData("string", 6)) self.drop_select(LandCommonEntity().get_field_select("multiTractSale"), multiTractSaleIndicator) self.ctrl_all(LandCommonEntity().get_field_input("nearestCommunity")) self.type(LandCommonEntity().get_field_input("nearestCommunity"), BasePage(self.driver).randomData("string", 6)) self.drop_select( LandCommonEntity().get_field_select("reservationEasementRequired"), reservationEasement) reservations_list = self.find_elements(LandDetailsEntity.reservations) rows = random.sample(range(1, len(reservations_list)), 3) for i in rows: self.click(LandDetailsEntity().get_reservation(i)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def Appraisal(self,source,estimatedValueMethod): self.ctrl_all(LandCommonEntity().get_field_input("appraisalDate")) self.type(LandCommonEntity().get_field_input("appraisalDate"),currentDate) self.enter(LandCommonEntity().get_field_input("appraisalDate")) self.ctrl_all(LandCommonEntity().get_field_input("appraisedAcres")) self.type(LandCommonEntity().get_field_input("appraisedAcres"), BasePage(self.driver).randomData("number", 2)) self.ctrl_all(LandCommonEntity().get_field_input("totalMarketValue")) self.type(LandCommonEntity().get_field_input("totalMarketValue"), BasePage(self.driver).randomData("number", 2)) self.ctrl_all(LandCommonEntity().get_field_input("landValue")) self.type(LandCommonEntity().get_field_input("landValue"), BasePage(self.driver).randomData("number", 2)) self.ctrl_all(LandCommonEntity().get_field_input("buildingValue")) self.type(LandCommonEntity().get_field_input("buildingValue"), BasePage(self.driver).randomData("number", 2)) self.ctrl_all(LandCommonEntity().get_field_input("improvementValue")) self.type(LandCommonEntity().get_field_input("improvementValue"), BasePage(self.driver).randomData("number", 2)) self.ctrl_all(LandCommonEntity().get_field_input("appraisalNumber")) self.type(LandCommonEntity().get_field_input("appraisalNumber"), BasePage(self.driver).randomData("number", 2)) self.drop_select(LandCommonEntity().get_field_select("source"), source) self.drop_select(LandCommonEntity().get_field_select("methodProperty"),estimatedValueMethod) self.ctrl_all(LandCommonEntity().get_field_input("mineralValue")) self.type(LandCommonEntity().get_field_input("mineralValue"),BasePage(self.driver).randomData("number", 2)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def Acquisition(self, acquisitionClass, acquisitionMethod): self.ctrl_all(LandCommonEntity().get_field_input("acquisitionDate")) self.type(LandCommonEntity().get_field_input("acquisitionDate"), currentDate) self.enter(LandCommonEntity().get_field_input("acquisitionDate")) self.ctrl_all(LandCommonEntity().get_field_input("cost")) self.type(LandCommonEntity().get_field_input("cost"), BasePage(self.driver).randomData("number", 2)) self.ctrl_all(LandCommonEntity().get_field_input("expenses")) self.type(LandCommonEntity().get_field_input("expenses"), BasePage(self.driver).randomData("number", 2)) self.drop_select(LandCommonEntity().get_field_select("classProperty"), acquisitionClass) self.drop_select(LandCommonEntity().get_field_select("methodProperty"), acquisitionMethod) self.ctrl_all(LandCommonEntity().get_field_input("namecurrent")) self.type(LandCommonEntity().get_field_input("namecurrent"), BasePage(self.driver).randomData("string", 6)) self.ctrl_all(LandCommonEntity().get_field_input("nameoriginal")) self.type(LandCommonEntity().get_field_input("nameoriginal"), BasePage(self.driver).randomData("string", 6)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def test_32_utilities_edit(self): u"""edit utilities""" utilityType = dbConnect().getdata( *(excelHandle(filepath, sheetName).read_excel("utilityType"))) LandCommonPage(self.driver).summary_operation("Land Details", "Utilities", "Edit", "1", "") self.assertTrue(LandDetailPage(self.driver).utilities(utilityType))
def test_28_saleDetails_edit(self): u"""edit SaleDetails""" multiTractSaleIndicator = dbConnect().getdata( *(excelHandle(filepath, sheetName).read_excel("multiTractSaleIndicator"))) reservationEasement = dbConnect().getdata( *(excelHandle(filepath, sheetName).read_excel("reservationEasement"))) LandCommonPage(self.driver).list_operation("Land Details","Sale Details", "Edit", "1","") self.assertTrue(LandDetailPage(self.driver).SaleDetails(multiTractSaleIndicator,reservationEasement))
def test_03_edit(self): u"""edit EventCalendar""" LandCommonPage(self.driver).top_operate("Event Calendar", "Actions ", "Edit") eventType = dbConnect().getdata( *(excelHandle(filepath, sheetName).read_excel("eventType"))) self.assertTrue( EventCalendarPage(self.driver).EventCalendar(eventType))
def test_07_dispositionPlan_new(self): u"""New dispositionPlan""" dispositionAttribute = dbConnect().getdata(*(excelHandle( filepath, sheetName).read_excel("dispositionAttribute"))) LandCommonPage(self.driver).summary_operation( "Land Details", "Disposition Attributes", "New", "", "") self.assertTrue( LandDetailPage(self.driver).dispositionPlan( 1, dispositionAttribute))
def test_26_surroundingUse_edit(self): u"""edit surroundingUse""" surroundingUseClass = dbConnect().getdata(*(excelHandle( filepath, sheetName).read_excel("surroundingUseClass"))) LandCommonPage(self.driver).summary_operation("Land Details", "Surrounding Use", "Edit", "1", "") self.assertTrue( LandDetailPage(self.driver).surroundingUse(surroundingUseClass))
def test_21_encumbrance_edit(self): u"""edit encumbrance""" encumbranceClass = dbConnect().getdata( *(excelHandle(filepath, sheetName).read_excel("encumbranceClass"))) LandCommonPage(self.driver).summary_operation("Land Details", "Encumbrances", "Edit", "1", "") self.assertTrue( LandDetailPage(self.driver).encumbrance(encumbranceClass))
def test_16_improvement_edit(self): u"""edit improvement""" improvementType = dbConnect().getdata( *(excelHandle(filepath, sheetName).read_excel("improvementType"))) LandCommonPage(self.driver).summary_operation("Land Details", "Improvements", "Edit", "1", "") self.assertTrue( LandDetailPage(self.driver).improvement(improvementType))
def test_03_edit(self): u"""edit Appraisal""" LandCommonPage(self.driver).top_operate("Land Appraisals", "Actions ", "Edit") source = dbConnect().getdata( *(excelHandle(filepath, sheetName).read_excel("source"))) estimatedValueMethod = dbConnect().getdata(*(excelHandle( filepath, sheetName).read_excel("estimatedValueMethod"))) self.assertTrue( AppraisalPage(self.driver).Appraisal(source, estimatedValueMethod))
def test_03_edit(self): u"""edit ExcessAcreage""" LandCommonPage(self.driver).top_operate("Excess Acreage","Actions ","Edit") countyName = dbConnect().getdata(*(excelHandle(filepath, sheetName).read_excel("countyName"))) mineralsSoldIndicator = dbConnect().getdata( *(excelHandle(filepath, sheetName).read_excel("mineralsSoldIndicator"))) prefix = dbConnect().getdata(*(excelHandle(filepath, sheetName).read_excel("prefix"))) suffix = dbConnect().getdata(*(excelHandle(filepath, sheetName).read_excel("suffix"))) self.assertTrue( ExcessAcreagePage(self.driver).ExcessAcreage(countyName,mineralsSoldIndicator,prefix,suffix))
def utilities(self, utilityType): self.drop_select(LandCommonEntity().get_field_select("propertyClass"), utilityType) self.ctrl_all(LandCommonEntity().get_textarea_specail("note")) self.type(LandCommonEntity().get_textarea_specail("note"), BasePage(self.driver).randomData("string", 6)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def counties(self, county, state): self.drop_select(LandCommonEntity().get_field_select("name"), county) self.drop_select(LandCommonEntity().get_field_select("state"), state) self.ctrl_all(LandCommonEntity().get_field_input("acres")) self.type(LandCommonEntity().get_field_input("acres"), BasePage(self.driver).randomData("number", 3)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def comments(self, commentClass): self.drop_select(LandCommonEntity().get_field_select("commentClass"), commentClass) self.ctrl_all(LandCommonEntity().get_field_textarea("comment")) self.type(LandCommonEntity().get_field_textarea("comment"), BasePage(self.driver).randomData("string", 6)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def encumbrance(self, encumbranceClass): self.drop_select( LandCommonEntity().get_field_select("encumbranceClass"), encumbranceClass) self.ctrl_all(LandCommonEntity().get_textarea_specail("description")) self.type(LandCommonEntity().get_textarea_specail("description"), BasePage(self.driver).randomData("string", 6)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def test_03_location(self): u"""New/Edit Location""" legalAccessIndicator = dbConnect().getdata(*(excelHandle( filepath, sheetName).read_excel("legalAccessIndicator"))) withinCityIndicator = dbConnect().getdata(*(excelHandle( filepath, sheetName).read_excel("withinCityIndicator"))) LandCommonPage(self.driver).summary_operation("Land Details", "Location", "Edit", "", "") self.assertTrue( LandDetailPage(self.driver).location(legalAccessIndicator, withinCityIndicator))
def utilization(self, utilizationClass, utilizationType): self.drop_select(LandCommonEntity().get_field_select("propertyClass"), utilizationClass) self.drop_select(LandCommonEntity().get_field_select("type"), utilizationType) self.ctrl_all(LandCommonEntity().get_field_input("percent")) self.type(LandCommonEntity().get_field_input("percent"), BasePage(self.driver).randomData("number", 2)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def location(self, legalAccessIndicator, withinCityIndicator): self.ctrl_all(LandCommonEntity().get_input_special("street1")) self.type(LandCommonEntity().get_input_special("street1"), BasePage(self.driver).randomData("string", 6)) self.ctrl_all(LandCommonEntity().get_textarea_specail("directions")) self.type(LandCommonEntity().get_textarea_specail("directions"), BasePage(self.driver).randomData("string", 6)) self.drop_select(LandCommonEntity().get_field_select("legalAccess"), legalAccessIndicator) self.drop_select(LandCommonEntity().get_field_select("withinCity"), withinCityIndicator) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def interest(self, interestClass, interestStatus): self.drop_select(LandCommonEntity().get_field_select("class"), interestClass) self.ctrl_all(LandCommonEntity().get_field_input("percent")) self.type(LandCommonEntity().get_field_input("percent"), BasePage(self.driver).randomData("number", 2)) self.drop_select(LandCommonEntity().get_field_select("status"), interestStatus) self.ctrl_all(LandCommonEntity().get_field_textarea("comment")) self.type(LandCommonEntity().get_field_textarea("comment"), BasePage(self.driver).randomData("string", 6)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def locationCountySeat(self, directionFromCountySeat, deviationFromCountySeat): self.drop_select(LandCommonEntity().get_field_select("direction"), directionFromCountySeat) self.ctrl_all(LandCommonEntity().get_input_special("distance")) self.type(LandCommonEntity().get_input_special("distance"), BasePage(self.driver).randomData("number", 1)) self.drop_select(LandCommonEntity().get_field_select("deviation"), deviationFromCountySeat) self.ctrl_all(LandCommonEntity().get_input_special("degree")) self.type(LandCommonEntity().get_input_special("degree"), BasePage(self.driver).randomData("number", 1)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def EventCalendar(self, eventType): self.ctrl_all(LandCommonEntity().get_field_input("eventDate")) self.type(LandCommonEntity().get_field_input("eventDate"), CurrentDate) self.enter(LandCommonEntity().get_field_input("eventDate")) self.ctrl_all(LandCommonEntity().get_field_input("eventName")) self.type(LandCommonEntity().get_field_input("eventName"), BasePage(self.driver).randomData("string", 6)) self.drop_select(LandCommonEntity().get_field_select("eventType"), eventType) self.ctrl_all(LandCommonEntity().get_field_textarea("description")) self.type(LandCommonEntity().get_field_textarea("description"), BasePage(self.driver).randomData("string", 6)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def characteristics(self, improvementsIndicator, utilitiesAvailableIndicator): self.drop_select( LandCommonEntity().get_field_select("hasImprovements"), improvementsIndicator) self.ctrl_all(LandCommonEntity().get_input_special("topography")) self.type(LandCommonEntity().get_input_special("topography"), BasePage(self.driver).randomData("string", 6)) self.drop_select( LandCommonEntity().get_field_select("utilitiesAvailable"), utilitiesAvailableIndicator) self.ctrl_all(LandCommonEntity().get_input_special("zoning")) self.type(LandCommonEntity().get_input_special("zoning"), BasePage(self.driver).randomData("string", 6)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def dispositionPlan(self, flag, dispositionAttribute): if flag == 1: self.drop_select( LandCommonEntity().get_field_select("attributes1"), dispositionAttribute) self.type(LandCommonEntity().get_input_special("comment1"), BasePage(self.driver).randomData("string", 6)) self.drop_select( LandCommonEntity().get_field_select("attributes2"), dispositionAttribute) self.type(LandCommonEntity().get_input_special("comment2"), BasePage(self.driver).randomData("string", 6)) else: self.drop_select(LandCommonEntity().get_field_select("attributes"), dispositionAttribute) self.ctrl_all(LandCommonEntity().get_textarea_specail("comment")) self.type(LandCommonEntity().get_textarea_specail("comment"), BasePage(self.driver).randomData("string", 6)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False
def test_04_delete(self): u"""delete EventCalendar""" self.assertTrue( LandCommonPage(self.driver).top_operate("Event Calendar", "Actions ", "Delete"))
def test_01_required(self): u"""top new Appraisal required""" # LandCommonPage(self.driver).top_operate("Event Calendar", "Actions ", "New") self.assertTrue(LandCommonPage(self.driver).required_validation())
def ExcessAcreage(self, countyName, mineralsSoldIndicator, prefix, suffix): self.ctrl_all(LandCommonEntity().get_field_input("applicationDate")) self.type(LandCommonEntity().get_field_input("applicationDate"), currentDate) self.enter(LandCommonEntity().get_field_input("applicationDate")) self.ctrl_all(LandCommonEntity().get_field_input("appraisalDate")) self.type(LandCommonEntity().get_field_input("appraisalDate"), currentDate) self.enter(LandCommonEntity().get_field_input("appraisalDate")) self.ctrl_all(LandCommonEntity().get_field_input("excessAcres")) self.type(LandCommonEntity().get_field_input("excessAcres"), BasePage(self.driver).randomData("number", 2)) self.ctrl_all( LandCommonEntity().get_field_input("excessAcresAppliedToPurchase")) self.type( LandCommonEntity().get_field_input("excessAcresAppliedToPurchase"), BasePage(self.driver).randomData("string", 6)) self.ctrl_all(LandCommonEntity().get_field_input("proRataShare")) self.type(LandCommonEntity().get_field_input("proRataShare"), BasePage(self.driver).randomData("number", 2)) self.ctrl_all(LandCommonEntity().get_field_input("appraisalValue")) self.type(LandCommonEntity().get_field_input("appraisalValue"), BasePage(self.driver).randomData("number", 3)) self.ctrl_all(LandCommonEntity().get_field_input("purchaseAmount")) self.type(LandCommonEntity().get_field_input("purchaseAmount"), BasePage(self.driver).randomData("number", 3)) self.ctrl_all(LandCommonEntity().get_field_input("mineralPerAcre")) self.type(LandCommonEntity().get_field_input("mineralPerAcre"), BasePage(self.driver).randomData("number", 3)) self.ctrl_all(LandCommonEntity().get_field_input("mineralTotal")) self.type(LandCommonEntity().get_field_input("mineralTotal"), BasePage(self.driver).randomData("number", 3)) self.ctrl_all(LandCommonEntity().get_field_input("surfacePerAcre")) self.type(LandCommonEntity().get_field_input("surfacePerAcre"), BasePage(self.driver).randomData("number", 3)) self.ctrl_all(LandCommonEntity().get_field_input("surfaceTotal")) self.type(LandCommonEntity().get_field_input("surfaceTotal"), BasePage(self.driver).randomData("number", 3)) self.ctrl_all(LandCommonEntity().get_field_input("applicantName")) self.type(LandCommonEntity().get_field_input("applicantName"), BasePage(self.driver).randomData("string", 6)) self.drop_select(LandCommonEntity().get_field_select("countyName"), countyName) self.drop_select( LandCommonEntity().get_field_select("mineralsSoldIndicator"), mineralsSoldIndicator) self.drop_select( LandCommonEntity().get_field_select("baseFiles.0.filePrefix"), prefix) self.drop_select( LandCommonEntity().get_field_select("baseFiles.0.fileSuffix"), suffix) self.ctrl_all( LandCommonEntity().get_field_input("baseFiles.0.fileNumber")) self.type(LandCommonEntity().get_field_input("baseFiles.0.fileNumber"), BasePage(self.driver).randomData("number", 6)) self.ctrl_all( LandCommonEntity().get_field_input("baseFiles.0.fileAppendAge")) self.type( LandCommonEntity().get_field_input("baseFiles.0.fileAppendAge"), BasePage(self.driver).randomData("number", 3)) self.click(LandCommonEntity().get_land_button("Save")) if 'successfully' in LandCommonPage(self.driver).get_tips_msg(): return True else: return False