def test_19RemoveProduct(self): self.addremove = addRemoveProducts(self.driver) self.log.info("*#" * 20) self.log.info( 'Removing a product from product detail page - RemoveProduct') self.log.info("*#" * 20) self.addremove.remove()
def budgetMet(self): self.addBudget() time.sleep(2) subtotal = self.getText(self._subtotal) self.ad = addRemoveProducts(self.driver) if subtotal == '-': self.ad.addRoomAssignment() subtotal = self.getText(self._subtotal) subtotal = subtotal.replace('$', '') time.sleep(2) self.webScroll(direction='up') self.addEditBudget() time.sleep(2) self.EnterBudget(subtotal) time.sleep(2) self.clickSaveButton() time.sleep(5) t = self.getText(self._budget_met) self.verifyTextContains(actualText=t, expectedText='Budget met!') time.sleep(2) self.elementClick(self._home_menu) time.sleep(5) bar_text = self.getText(self._bar) time.sleep(2) self.verifyTextContains(actualText=t, expectedText=bar_text)
def test_17VerifyRemoveModelBoxText(self): self.addremove = addRemoveProducts(self.driver) self.log.info("*#" * 20) self.log.info( 'Removing a product from product detail page - RemoveModelBoxText') self.log.info("*#" * 20) self.addremove.removeProductText()
def test_22AssignNewRoomDropDownFilterFloor(self): self.addremove = addRemoveProducts(self.driver) self.log.info("*#" * 20) self.log.info( '# Assign to new rooms Tab - Floor drop-down filter Functionality') self.log.info("*#" * 20) self.addremove.AssignToNewRoom_FloorFilterDropDown()
def AllRoomCount(self): time.sleep(20) self.ar = addRemoveProducts(self.driver) self.ar.clickProduct() time.sleep(2) self.webScroll(direction='down') time.sleep(2) self.waitForElement(self._all_rooms) self.elementClick(self._all_rooms) room_count = self.getText(self._all_rooms) room_count = room_count.split() room_count = room_count[2] room_count = room_count.replace("(", '') room_count = room_count.replace(")", '') self.log.info(room_count) time.sleep(2) self.elementClick(self._rooms_dropdown_click) time.sleep(2) self.elementClick(self._rooms_view_all_click) time.sleep(4) total_room = self.getText(self._product_count) total_room = total_room.split() total_room = total_room[0] self.log.info(total_room) self.verifyTextContains(actualText=total_room, expectedText=room_count)
def test_18VerifyCancelButtonClickOnRemoveModalBox(self): self.addremove = addRemoveProducts(self.driver) self.log.info("*#" * 20) self.log.info( 'Removing a product from product detail page - Click Cancel Button On Remove ModalBox' ) self.log.info("*#" * 20) self.addremove.cancelButton()
def test_24ProductDetail_ProductDropDownFilterSelectAssigned(self): self.addremove = addRemoveProducts(self.driver) self.log.info("*#" * 20) self.log.info( '# # Product Detail Screen - Product dropdown filter- Select Assigned' ) self.log.info("*#" * 20) self.addremove.ProductDetailScreen_ProductDropdownAssigned()
def BulkCopyButton_VerifyAccessoryShowingTopOfList(self): self.add = addRemoveProducts(self.driver) time.sleep(5) self.elementClick(self._click_bulk_copy_button) time.sleep(2) list_text = "Bulk copy accessory" bulk_text = self.getText(self._bulk_copy_list) self.verifyTextContains(actualText=bulk_text, expectedText=list_text) self.add.clickAddAssignment() # Click on the assignment link self.RemoveAddedProduct() # Remove the product
def BulkCopyButton_VerifyOpsAssetFurnitureShowingTopOfList(self): self.add = addRemoveProducts(self.driver) time.sleep(4) self.elementClick(self._click_bulk_copy_button) time.sleep(2) list_text = "Bulk copy ops asset" bulk_text = self.getText(self._bulk_copy_list) self.verifyTextContains(actualText=bulk_text, expectedText=list_text) self.add.clickAddAssignment() self.RemoveAddedProduct()
def AddAssignment(self): time.sleep(2) self.ar = addRemoveProducts(self.driver) self.ar.clickAddAssignment() time.sleep(2) self.elementClick(self._assign_new_product_click) time.sleep(3) self.elementClick(self._select_checkbox) time.sleep(2) self.elementClick(self._plus_button)
def AddingOpsAssetProduct_VerifyAddedInViewByType(self): time.sleep(2) self.add = addRemoveProducts(self.driver) self.add.addProduct() time.sleep(2) self.elementClick(self._click_ops_asset_filter) time.sleep(2) self.add.clickProductField() time.sleep(2) self.elementClick(self._add_to_project) time.sleep(2) self.elementClick(self._click_sub_menu) time.sleep(2) ops_asset = self.getText(self._view_by_type_ops_asset_filter) ops_asset = ops_asset[:-4] text = "Ops Asset" self.verifyTextContains(actualText=ops_asset, expectedText=text)
def AddingOfficeFurnitureProduct_VerifyAddedInViewByType(self): self.add = addRemoveProducts(self.driver) time.sleep(2) self.add.addProduct() time.sleep(2) self.elementClick(self._click_office_furniture_filter) time.sleep(2) self.add.clickProductField() time.sleep(2) self.elementClick(self._add_to_project) time.sleep(2) self.elementClick(self._click_sub_menu) time.sleep(2) office_furniture = self.getText( self._view_by_type_office_furniture_filter) office_furniture = office_furniture[:-4] text = "Office Furniture" self.verifyTextContains(actualText=office_furniture, expectedText=text)
def AddingAccessoryProduct_VerifyAddedInViewByType(self): self.loop() self.add = addRemoveProducts(self.driver) time.sleep(2) self.add.addProduct() time.sleep(2) self.elementClick(self._click_accessory_filter) time.sleep(2) self.add.clickProductField() time.sleep(3) self.elementClick(self._add_to_project) time.sleep(2) self.elementClick(self._click_sub_menu) time.sleep(2) accessory = self.getText(self._view_by_type_accessory_filter) accessory = accessory.split() accessory = accessory[0] text = "Accessory" self.verifyTextContains(actualText=accessory, expectedText=text)
def test_20AssignNewRoomSearch(self): self.addremove = addRemoveProducts(self.driver) self.log.info("*#" * 20) self.log.info('Assign to new rooms Tab - Search Functionality') self.log.info("*#" * 20) self.addremove.AssignToNewRoom_searchFunctionality()
def RemoveAddedProduct(self): self.add = addRemoveProducts(self.driver) self.add.remove()
def test_15VerifyCloseButtonFunctionality(self): self.addremove = addRemoveProducts(self.driver) self.log.info("*#" * 20) self.log.info("close button functionality") self.log.info("*#" * 20) self.addremove.closeButton()
def test_14VerifyBinButtonFunctionality(self): self.addremove = addRemoveProducts(self.driver) self.log.info("*#" * 20) self.log.info("*#" * 20) self.log.info("*#" * 20) self.addremove.binButton()
def test_13VerifyChangesAfterRemovingTheRoom(self): self.addremove = addRemoveProducts(self.driver) self.addremove.deleteRoomChangesApply()
def test_11VerifyDecreaseQuantityApplyChanges(self): self.addremove = addRemoveProducts(self.driver) self.addremove.quantityDecrease()
def objectSetup(self, oneTimeSetUp): self.addremove = addRemoveProducts(self.driver)
def test_21AssignNewRoomSearchWithoutData(self): self.addremove = addRemoveProducts(self.driver) self.log.info("*#" * 20) self.log.info('Assign to new rooms Tab - Search Functionality') self.log.info("*#" * 20) self.addremove.AssignToNewRoom_IrreleavantSearchFunctionality()