def testCreateCardAll(self): name = data.DiscountCard['Blue Friday']['Name'] code = data.DiscountCard['Blue Friday']['Code'] discount = data.DiscountCard['Blue Friday']['Discount'] category = data.DiscountCard['Blue Friday']['Category'] self.html.clickElement('Új kedvezménykártya', 'a') self.html.switchFrame('iframe') self.html.fillInput('Megnevezés', name) self.html.fillInput('Kód', code) self.html.getElement('Kategóriák', 'label', Options(following='button')).click() self.html.clickElement('Mind', 'a') #self.html.clickDropdown('Kategóriák', category) self.html.clickElement('Kategóriák', 'label') self.html.clickElement('dc_is_percent', 'label', options=Options(htmlAttribute='data-name')) for day in self.days: self.html.fillInput(day, discount, 'input', options=Options(htmlAttribute='data-title')) self.html.clickElement('Rögzít') self.clientAssert.assertDiscountCardExist(name, code, discount, category='all') self.clientseed.deleteCard(data.DiscountCard['Blue Friday']['Name'])
def createNewMovement(self): self.html.wait() self.html.clickElement('Új raktármozgás', 'a', waitSeconds=2) self.html.clickElement('Új') self.html.switchFrame('iframe') self.html.clickDropdown('Forrás raktár', data.WareHouses['Szeszraktár']['Name']) self.html.wait() self.html.clickDropdown('Cél raktár', data.WareHouses['Tartalékraktár']['Name']) self.html.fillAutocomplete('Nyersanyag', 'input', data.RawMaterial['Bundas_kenyer']['Name'], data.RawMaterial['Bundas_kenyer']['Name'], 'li', Options(htmlAttribute='data-title')) self.html.getElement('Maximum', 'input', Options(htmlAttribute='data-title')).click() self.html.wait() self.html.fillInput('Mennyiség', self.moveQuantity, 'data-title') self.html.clickElement('Hozzáad') self.html.clickElement('Rögzít') self.html.switchFrame() self.html.refresh()
def testOpeningButton(self): self.stockseed.createRawMaterial( data.RawMaterial['Bundas_kenyer']['Name'], data.RawMaterial['Bundas_kenyer']['ME'], data.WareHouses['Szeszraktár']['Name'], module=True) self.html.search(data.RawMaterial['Bundas_kenyer']['Name'], 'Raktárkészlet') self.html.clickElement(data.RawMaterial['Bundas_kenyer']['Name'], 'td', Options(following='a')) self.html.clickElement('Nyitókészlet', 'a') self.html.switchFrame('iframe') input = self.html.getElement(data.RawMaterial['Bundas_kenyer']['Name'], 'td', Options(following='input')) input.send_keys(data.RawMaterial['Bundas_kenyer']['Quantity2']) self.html.clickDropdown(data.RawMaterial['Bundas_kenyer']['Name'], data.WareHouses['Szeszraktár']['Name'], 'td') self.html.clickElement('Rögzít', 'span', waitSeconds=2) self.html.switchFrame() self.html.clickElement('Close', 'a', Options(htmlAttribute='title')) self.html.refresh() self.stockAssert.assertStock( data.RawMaterial['Bundas_kenyer']['Name'], data.WareHouses['Szeszraktár']['Name'], str(int(float(data.RawMaterial['Bundas_kenyer']['Quantity2'])))) self.stockseed.deleteRawMaterial( data.RawMaterial['Bundas_kenyer']['Name'])
def clickDropdown(self, target, selectValue, selector='label', options=Options()): """ Select value from dropdown button :param target: It's next to dropdown button :type target: String :param selectValue: This is what we want to select :type selectValue: String """ if self.getOption(options, 'element') is not None: self.getElement( target, selector, Options(following='button', element=self.getOption(options, 'element'))).click() element = self.getElement( target, selector, Options(following='ul', element=self.getOption(options, 'element'))) element.find_element_by_xpath('.//label[contains(.,"' + selectValue + '")]').click() else: self.getElement(target, selector, Options(following='button')).click() element = self.getElement( target, selector, Options(following='ul', element=self.getOption(options, 'element'))) element.find_element_by_xpath('.//label[contains(.,"' + selectValue + '")]').click()
def createRegular(self, name, code, phone, discount, taxnumber, country, postalCode, city, street, houseNumber, module=False, tab=False): if module: self.menu.openClientManagement() self.html.clickElement('Törzsvendégek', 'a') if tab: self.html.clickElement('Törzsvendégek', 'a') self.html.clickElement('Új törzsvendég', 'a', waitSeconds=2) self.html.switchFrame('iframe') self.html.fillInput('Név / azonosító', name) self.html.fillInput('Ügyfélazonosító', code) self.html.fillInput('Telefon', phone) self.html.fillInput('Kedv. (%)', discount) self.html.fillInput('Adószám', taxnumber) self.html.fillInput('ca_country_helper', country, 'input', options=Options(htmlAttribute='id')) self.html.fillInput('ca_zip_helper', postalCode, 'input', options=Options(htmlAttribute='id')) self.html.fillInput('ca_city_helper', city, 'input', options=Options(htmlAttribute='id')) self.html.fillInput('ca_street_helper', street, 'input', options=Options(htmlAttribute='id')) self.html.fillInput('ca_housenumber_helper', houseNumber, 'input', options=Options(htmlAttribute='id')) self.html.clickElement('Hozzáad') self.html.clickElement('Rögzít', waitSeconds=2) self.html.switchFrame() address = country + ', ' + postalCode + ' ' + city + ' ' + street + ' ' + houseNumber return address
def assertGroupExist(self, name, rights): # jogosultsagok csekkolasa rightsList = self.html.getElement('groupsRightList', 'ul', options=Options(htmlAttribute='id')) observedRights = self.html.getElements( '', 'li', options=Options(element=rightsList)) for i in observedRights: temp = i.text.split('\n')[0] self.assertTrue(temp in rights)
def createProduct(self, name, group, code, counter, component, compQty=2, netPrice=100, module=False): if module: self.menu.openProducts() self.html.clickElement('Új termék felvitele', 'a') self.html.switchFrame('iframe') self.html.clickDropdown('Nyomtatási részleg', 'Pult') self.html.switchFrame('iframe') self.html.clickElement(group, 'a') self.html.clickElement('Rögzít') self.html.switchFrame('iframe') self.html.fillInput('Termék neve', name) self.html.fillInput('Kód', code) self.html.clickElement('p_counters', 'input', Options(htmlAttribute='id'), waitSeconds=1) self.html.switchFrame('iframe') self.html.clickElement(counter, 'td') self.html.clickElement('Rögzít') self.html.switchFrame('iframe') places = self.html.getElement('Eladási ár (Kötelező)', 'td') self.html.clickElement('Ár megadása', options=Options(element=places)) self.html.fillInput('Nettó', netPrice) self.html.wait(1) self.html.clickElement('taxPriceSave', 'a', options=Options(htmlAttribute='id')) self.html.wait(2) self.html.fillAutocomplete('componentName', 'input', component, component, 'li', Options(htmlAttribute='id')) self.html.fillInput('componentQty', compQty, 'input', options=Options(htmlAttribute='id')) self.html.clickElement('Hozzáad') self.html.clickElement('Rögzít')
def search(self, value, tab): self.wait(2) try: currWindow = self.getTab(tab) except NoSuchElementException: return self.fillInput('searchinput simpleFilterTerm', value, selector='class', options=Options(element=currWindow)) self.clickElement('Keresés', options=Options(element=currWindow)) self.wait(2)
def addProductToList(self, productName, quantity): self.html.fillAutocomplete('Terméknév', 'input', productName[:-1], productName, 'li', Options(htmlAttribute='placeholder')) self.html.fillInput('Mennyiség', quantity, 'placeholder') self.html.clickElement('addProduct', 'a', options=Options(htmlAttribute='id')) name = self.html.getTxtFromListTable2('2', '3') qty = self.html.getTxtFromListTable2('2', '5') self.assertEqual(name.text, productName) self.assertEqual(qty.text, quantity)
def getTab(self, tab): # az osszes tabot tartalmazo ul lista // azert, mert mashol is elofprdulhat a tabnev tabList = self.getElement('ui-tabs-nav ui-state-default', 'ul', options=Options(htmlAttribute='class')) var = self.getElement(tab, 'a', Options(element=tabList)) href = var.get_attribute('href') subResult = href.split('#') result = self.getElement(subResult[1], 'div', options=Options(htmlAttribute='id')) return result
def createProductConveniencies(self, name, group, code, counter, component, compQty=2, module=False): if module: self.menu.openProducts() self.html.clickElement('Új termék felvitele', 'a') self.html.switchFrame('iframe') self.html.clickDropdown('Nyomtatási részleg', 'Pult') self.html.switchFrame('iframe') self.html.clickElement(group, 'a') self.html.clickElement('Rögzít') self.html.switchFrame('iframe') self.html.fillInput('Termék neve', name) self.html.fillInput('Kód', code) self.html.clickElement('p_counters', 'input', Options(htmlAttribute='id'), waitSeconds=1) self.html.switchFrame('iframe') self.html.clickElement(counter, 'td') self.html.clickElement('Rögzít') self.html.switchFrame('iframe') self.html.clickElement( None, './/label[contains(.,"Gyártás termék") and @class="radio formStyle"]', options=Options(uniqueSelector=True)) self.html.fillInput('Recept adag', '1') self.html.fillAutocomplete('componentName', 'input', component, component, 'li', Options(htmlAttribute='id')) self.html.fillInput('componentQty', compQty, 'input', options=Options(htmlAttribute='id')) self.html.clickElement('Hozzáad') self.html.clickElement('Rögzít')
def testDelete(self): self.html.refresh() self.stockseed.createWarehouse(data.WareHouses['Szeszraktár']['Name']) self.html.search(data.WareHouses['Szeszraktár']['Name'], 'Raktárak') currWindow = self.html.getElement('tabs-3', 'div', options=Options(htmlAttribute='id')) self.html.clickElement(data.WareHouses['Szeszraktár']['Name'], 'td', Options(following='a', element=currWindow)) self.html.clickElement("Igen", waitSeconds=2) self.html.search('', 'Raktárak') self.stockAssert.assertWarehouseNotExist( data.WareHouses['Szeszraktár']['Name'], 'Raktárak') self.html.search('', 'Raktárak')
def getInput(self, target, selector, options=Options()): if selector != 'label': if self.getOption(options, 'htmlAttribute'): htmlAttribute = self.getOption(options, 'htmlAttribute') return self.getElement( target, selector, Options(htmlAttribute=htmlAttribute, element=self.getOption(options, 'element'))) else: return self.getElement( target, 'input', Options(htmlAttribute=selector, element=self.getOption(options, 'element'))) options.following = 'input' return self.getElement(target, selector, options)
def getElements(self, target, tag, options=Options()): if self.getOption(options, 'element') is not None: element = self.getOption(options, 'element') else: element = self.driver if self.getOption(options, 'uniqueSelector'): return element.find_elements_by_xpath(tag) htmlAttribute = self.getOption(options, 'htmlAttribute') exactMatch = self.getOption(options, 'exactMatch') if htmlAttribute and exactMatch: raise ValueError( 'exactMatch must be false while using htmlAttribute') if htmlAttribute: xpath = './/' + tag + '[@' + htmlAttribute + '="' + target + '"]' xpath = self.appendFollowing(xpath, options) return element.find_elements_by_xpath(xpath) xpath = self.getXpathByExactMatch(tag, target, options) xpath = self.appendFollowing(xpath, options) return element.find_elements_by_xpath(xpath)
def testUpdate(self): modofiedName = 'Gumicukros pizza' modifiedNetPrice = 3000 modifiedGrossPrice = self.html.extendedRound(modifiedNetPrice * 1.27, 2) self.productseed.createPizza(data.Pizza['Sonkas_pizza']['Name'], data.RawMaterial['Bundas_kenyer']['Name'], 'Pizza feltét') self.html.clickTableElement('customproduct-2', 'id', data.Pizza['Sonkas_pizza']['Name'], 'a', 'Szerkeszt', 'Pizza (testreszabható)') self.html.switchFrame('iframe') self.html.fillInput('Termék neve', modofiedName) self.html.clickElement('Mennyiségek', 'a') # td = self.html.getElement('Eladási ár(ak)', 'td') self.html.clickElement('edit actionButton fright editPriceBtn', 'a', Options(htmlAttribute='class')) self.html.fillInput('Nettó', modifiedNetPrice) self.html.wait(2) self.html.clickElement('Rögzít', 'a', waitSeconds=2) #self.html.closeAllert() #self.html.clickElement('Rögzít', 'a') self.html.clickElement('Rögzít') self.html.refresh() self.productAssert.assertPizzaExists(modofiedName, modifiedGrossPrice) self.productseed.deletePizza(modofiedName)
def getTxtFromTable(self, row, col, tableId='', options=Options()): """ We can get a value from table that depends on params :param row: Table row number :type row: Int or string :param col: Table column number :type col: Int or String :return: Cell value :rtype: String """ element = self.getOption(options, 'element') if element is None: if tableId == '': return self.driver.find_element_by_xpath( '//table//tbody//tr[' + str(row) + ']/td[' + str(col) + ']').text else: return self.driver.find_element_by_xpath('//table[@id="' + tableId + '"]//tbody//tr[' + str(row) + ']/td[' + str(col) + ']').text else: if tableId == '': # asd = element.find_element_by_xpath('./table/tbody//tr[' + str(row) + ']/td[' + str(col) + ']').text print('asdasd') return element.find_element_by_xpath('./table/tbody//tr[' + str(row) + ']/td[' + str(col) + ']').text else: return element.find_element_by_xpath('./table[@id="' + tableId + '"]/tbody/tr[' + str(row) + ']/td[' + str(col) + ']').text
def clearInput(self, target, selector='label', options=Options()): input = self.getInput(target, selector, options) input.clear() if input.get_attribute('value'): input.send_keys(Keys.CONTROL + 'a') input.send_keys(Keys.DELETE)
def testMoveToTable(self): inputName = data.Product['Babgulyás']['Name'] inputName2 = data.Product['Palacsinta']['Name'] self.addProductToList(inputName, '1.00') self.addProductToList(inputName2, '1.00') self.html.refresh() self.html.clickElement('Rendelés beküldése', waitSeconds=3) self.html.clickElement(data.Table['Normal']['Name'], tag='i') # muvelet self.html.clickTableElement('tasks-list products ui-sortable', 'class', inputName, 'div', inputName) self.html.clickElement('Áthelyez másik asztalra') self.html.clickElement(data.Table['Courier']['Name'], 'a') self.html.refresh() self.html.clickElement('Vissza', 'a', waitSeconds=2) self.html.clickElement(data.Table['Courier']['Name'], tag='i') # csekkoljuk a dolgokat name = self.html.getTxtFromListTable( '2', '3', tableId='tasks-list products ui-sortable', options=Options(htmlAttribute='class')) qty = self.html.getTxtFromListTable( '2', '5', tableId='tasks-list products ui-sortable', options=Options(htmlAttribute='class')) self.assertEqual(name.text, inputName) self.assertEqual(qty.text, '1.00') # sztorno self.html.clickElement('Sztornó', 'a') self.html.clickElement('Vendég visszamondta (raktárba visszatesz)', waitSeconds=2) self.restaurantAssert.assertStornoSucces(inputName) self.html.clickElement('Vissza', 'a') self.html.clickElement(data.Table['Normal']['Name'], tag='i') self.html.clickElement('Sztornó', 'a') self.html.clickElement('Vendég visszamondta (raktárba visszatesz)', waitSeconds=2) self.restaurantAssert.assertStornoSucces(inputName2)
def testQualityStorno(self): # mennyiseg ellenorzese self.stockAssert.assertStock( data.RawMaterial['Bundas_kenyer']['Name'], data.RawMaterial['Bundas_kenyer']['Warehouse'], '10') # vissza az etterembe self.menu.openRestaurant() self.html.clickElement(data.Table['Normal']['Name'], tag='i') # rendeles bekuldese self.addProductToList(data.Product['Babgulyás']['Name'], '1.00') self.html.refresh() self.html.clickElement('Rendelés beküldése', waitSeconds=3) self.html.clickElement(data.Table['Normal']['Name'], tag='i') name = self.html.getTxtFromListTable2('2', '3') qty = self.html.getTxtFromListTable2('2', '5') storno = self.html.getTxtFromListTable2('2', '8') # csekkolas self.assertEqual(name.text, data.Product['Babgulyás']['Name']) self.assertEqual(qty.text, '1.00') self.assertEqual(storno.text, 'Sztornó') # ez lehet itt nem kell, de nem baj ha van self.stockAssert.assertStock( data.RawMaterial['Bundas_kenyer']['Name'], data.RawMaterial['Bundas_kenyer']['Warehouse'], '8') self.menu.openRestaurant() self.html.clickElement(data.Table['Normal']['Name'], tag='i') # johet a sztorno self.html.clickTableElement('tasks-list products ui-sortable', 'class', data.Product['Babgulyás']['Name'], 'div', 'Sztornó') self.html.clickElement('Minőségi kifogás', waitSeconds=1) self.html.fillInput('Minőségi kifogás indoka', 'teszt01 sztornó', 'textarea', options=Options(htmlAttribute='placeholder')) self.html.clickElement('Minőségi kifogás küldése', waitSeconds=2) self.restaurantAssert.assertProductNotInList() self.restaurantAssert.assertStornoSucces( data.Product['Babgulyás']['Name']) # mennyiseg ellenorzese self.stockAssert.assertStock( data.RawMaterial['Bundas_kenyer']['Name'], data.RawMaterial['Bundas_kenyer']['Warehouse'], '8') # selejt ellenorzese self.html.clickElement('Selejtezések', 'a') name = self.html.getElementInTable( data.RawMaterial['Bundas_kenyer']['Name'], 'component_waste', 'Selejtezések').is_displayed() excuse = self.html.getTxtFromTable('1', '5', 'component_waste') self.assertTrue(name) self.assertEqual(excuse, 'teszt01 sztornó')
def assertDeletedMaterial(self, materialName, whName): self.html.clickElement('Raktárak', 'a') self.html.search(whName, 'Raktárak') self.html.clickElement( None, "//tr[contains(., '" + whName + "')]//a[contains(@class, 'stock') and contains(@class, 'actionButton')]", Options(uniqueSelector=True)) self.html.switchFrame("iframe") with self.assertRaises(NoSuchElementException): self.html.getElement(materialName, 'td') self.html.switchFrame() self.html.clickElement('Close', 'a', Options(htmlAttribute='title')) self.menu.openStocks()
def assertReceivingDetails( self, materialName, qty, ): table = self.html.getElement('noHover', 'table', options=Options(htmlAttribute='class')) name = self.html.getElement(materialName, 'td', Options(element=table)).text self.assertEqual(name, materialName) actqty = self.html.getElement(materialName, 'td', Options(following='td', element=table)).text self.assertEqual(actqty, qty)
def setUpClass(self): super().setUpClass() super().login(self) self.menu.openStocks() self.html.clickElement('Selejtezések', 'a') self.html.currWindow = self.html.getElement( 'tabs-6', 'div', options=Options(htmlAttribute='id'))
def createPizza(self, pizzaName, baseComponent, topping, module=False, tab=False): if module: self.menu.openProducts() self.html.clickElement('Pizza (testreszabható)', 'a') elif tab: self.html.clickElement('Pizza (testreszabható)', 'a') self.html.clickElement('Új pizza (testreszabható)', 'a') self.html.switchFrame('iframe') self.html.clickDropdown('Nyomtatási részleg', 'Pizza') self.html.fillInput('Termék neve', pizzaName) self.html.fillInput('Kód', '1211') self.html.clickDropdown('Szósz', 'Paradicsomos alap') self.html.fillAutocomplete('baseComponentName', 'input', baseComponent, baseComponent, 'li', Options(htmlAttribute='id')) table = self.html.getElement('baseComponents', 'table', Options(htmlAttribute='id')) self.html.getElement('Hozzáad', 'button', Options(element=table)).click() # self.html.fillAutocomplete('toppingComponentName', 'input', topping, topping, 'li', Options(htmlAttribute='id')) # table = self.html.getElement('toppingComponents', 'table', Options(htmlAttribute='id')) # self.html.getElement('Hozzáad', 'button', element=table).click() self.html.clickElement('Mennyiségek', 'a') self.html.wait(2) td = self.html.getElement('Eladási ár(ak)', 'td') self.html.clickElement('edit actionButton fright editPriceBtn', 'a', Options(htmlAttribute='class')) self.html.fillInput('Nettó', '1000') self.html.wait(2) self.html.clickElement('Rögzít', 'a', waitSeconds=2) #self.html.closeAllert() #self.html.clickElement('Rögzít', 'a') self.html.clickElement('Rögzít')
def testCreateCardProduct(self): name = data.DiscountCard['White Friday']['Name'] code = data.DiscountCard['White Friday']['Code'] discount = data.DiscountCard['White Friday']['Discount'] category = data.DiscountCard['White Friday']['Category'] productGroup = data.DiscountCard['White Friday']['ProductGroup'] product = data.DiscountCard['White Friday']['Product'] self.html.clickElement('Új kedvezménykártya', 'a') self.html.switchFrame('iframe') self.html.fillInput('Megnevezés', name) self.html.fillInput('Kód', code) self.html.clickDropdown('Kategóriák', category) self.html.clickElement('Kategóriák', 'label') self.html.clickElement('Termékcsoportok', 'label', options=Options(following='input')) self.html.switchFrame('iframe') self.html.clickElement(productGroup, 'a') self.html.clickElement('Rögzít') self.html.switchFrame('iframe') self.html.clickDropdown( 'Termékek', product) # itt majd lehet egy keresest be kell epiteni self.html.clickElement('Termékek', 'label') self.html.clickElement('dc_is_percent', 'label', options=Options(htmlAttribute='data-name')) for day in self.days: self.html.fillInput(day, discount, 'input', options=Options(htmlAttribute='data-title')) self.html.clickElement('Rögzít') self.clientAssert.assertDiscountCardExist(name, code, discount, group=productGroup, category='Ital', products=product) self.clientseed.deleteCard(data.DiscountCard['White Friday']['Name'])
def createDynamicCourierTable(self, name): self.html.clickElement('+', waitSeconds=1) self.html.fillAutocomplete('cl_name', 'input', name, name, 'li', options=Options(htmlAttribute='id')) self.html.clickElement('Rögzít', 'span')
def deleteParter(self, partnerName, module=False, tab=False): if module: self.menu.openReceiving() self.html.clickElement('Beszállítók', 'a') if tab: self.html.clickElement('Beszállítók', 'a') self.html.search(partnerName, 'Beszállítók') self.html.clickElement( None, '//table[@id="partners"]//tr[contains(.,"' + partnerName + '")]//label', Options(uniqueSelector=True)) self.html.clickElement('deletePartners', options=Options(htmlAttribute='id')) self.html.clickElement('Igen') self.html.refresh() self.receivingAssert.assertPartnerNotExist(partnerName, 'Beszállítók')
def clickElement( self, target, tag='button', options=Options(), waitSeconds=0, ): self.getElement(target, tag, options).click() self.wait(waitSeconds)
def clickTableDropdown(self, materialName, target, tab): self.search(materialName, tab) element = self.getElement(materialName, 'td', Options(following='td[contains(.,"Menü")]')) element.find_element_by_xpath('./a').click() self.wait(1) element2 = element.find_element_by_xpath('./div') element2.find_element_by_xpath('./ul/li[contains(.,"' + target + '")]').click() self.wait(1)
def testMove(self): inputName = data.Product['Babgulyás']['Name'] self.addProductToList(inputName, '1.00') self.html.refresh() self.html.clickElement('Rendelés beküldése', waitSeconds=3) self.html.clickElement(data.Table['Normal']['Name'], tag='i') # művelet self.html.clickTableElement('tasks-list products ui-sortable', 'class', inputName, 'div', inputName) self.html.clickElement('Áthelyez részasztalra') partTablesDialog = self.html.getElement( 'moveDialog', 'div', options=Options(htmlAttribute='id')) self.html.clickElement('2', 'a', options=Options(element=partTablesDialog), waitSeconds=4) self.html.clickElement('2', 'a') # csekkolas name = self.html.getTxtFromListTable2('2', '3') qty = self.html.getTxtFromListTable2('2', '5') self.assertEqual(name.text, inputName) self.assertEqual(qty.text, '1.00') # sztorno self.html.clickElement('Sztornó', 'a') self.html.clickElement('Vendég visszamondta (raktárba visszatesz)', waitSeconds=2) self.html.wait(5) # megkell varni h az ertesitesi ablak megjelenjen self.assertTrue( self.html.getElement( inputName + ' nevű termék a felszolgáló által sztornózva lett! ', 'li').is_displayed()) self.html.clickElement('Rendben', 'a') self.html.clickElement('1', 'a')
def testUpdateMenu(self): modifiedName = 'Heti menu' modifiedPrice = '300' modifiedGrossPrice = self.html.extendedRound( int(modifiedPrice) * 1.27, 2) self.productseed.createMenu(data.Menu['NapiMenu']['Name'], data.Product['Babgulyás']['Name'], data.Product['Palacsinta']['Name'], data.Menu['NapiMenu']['Price']) self.html.clickTableElement('menu', 'id', data.Menu['NapiMenu']['Name'], 'span', 'Szerkeszt', 'Menü') self.html.switchFrame('iframe') self.html.fillInput('Termék neve', modifiedName) self.html.getElement('27%', 'td', Options(following='td//input')).clear() self.html.getElement( '27%', 'td', Options(following='td//input')).send_keys(modifiedPrice) self.html.clickElement('Rögzít') self.html.wait(2) try: self.html.getElement('iframe hasTwoRow', 'body', Options(htmlAttribute='class')) except NoSuchElementException: self.html.switchFrame() else: self.html.clickElement('Rögzít') self.html.switchFrame() self.html.refresh() self.html.search(modifiedName, 'Menü') self.html.wait(3) self.productAssert.assertMenuExists(modifiedName, str(modifiedGrossPrice)) self.productseed.deleteMenu(modifiedName)