Пример #1
0
    def setUpClass(self):

        chrome_options = Options()
        chrome_options.add_argument('--headless')
        chrome_options.add_argument('--window-size=1920,1080')
        # chrome_options.add_argument("--auto-open-devtools-for-tabs")
        #chrome_options.add_argument('--disable-gpu')
        #chrome_options.headless = True
        self.driver = webdriver.Chrome(
            executable_path='C:/webdrivers/chromedriver.exe',
            options=chrome_options)

        self.driver.delete_all_cookies()
        self.driver.maximize_window()

        config = read_section()
        self.driver.get(config.get('path'))

        self.html = HtmlProxy(self.driver)
        self.menu = MainMenuProxy(self.driver)
        self.stockseed = StockSeed(self.driver)
        self.productseed = ProductSeed(self.driver)
        self.receivingseed = ReceivingSeed(self.driver)
        self.restaurantseed = RestaurantSeed(self.driver)
        self.clientseed = ClientSeed(self.driver)
        self.usersSeed = UsersSeed(self.driver)
        self.stockAssert = StockAssert(self.html, self.driver)
        self.productAssert = ProductAssert(self.html, self.driver)
        self.receivingAssert = ReceivingAssert(self.html, self.driver)
        self.restaurantAssert = RestaurantAssert(self.html, self.driver)
        self.clientAssert = ClientManagementAssert(self.html, self.driver)
        self.usersAssert = UserAssert(self.html, self.driver)
        self.result = unittest.TestResult
Пример #2
0
class CGSpecific:

    html = HtmlProxy(webdriver)

    def search(self, value, tab):
        self.html.wait(2)
        try:
            currWindow = self.html.getTab(tab)
        except NoSuchElementException:
            return

        self.html.fillInput('searchinput simpleFilterTerm', value, selector='class', element=currWindow)
        self.html.clickElement('Keresés', element=currWindow)
        self.html.wait(2)
Пример #3
0
 def __init__(self, driver):
     self.driver = driver
     self.html = HtmlProxy(self.driver)
     self.menu = MainMenuProxy(self.driver)
     self.stockAssert = StockAssert(self.html, self.driver)
Пример #4
0
 def __init__(self, driver):
     self.driver = driver
     self.html = HtmlProxy(self.driver)
     config = read_section()
     self.baseUrl = (config.get('path'))
Пример #5
0
 def __init__(self, driver):
     self.driver = driver
     self.html = HtmlProxy(self.driver)
     self.menu = MainMenuProxy(self.driver)
     self.receivingAssert = ReceivingAssert(self.html, self.driver)
Пример #6
0
 def __init__(self, driver):
     self.driver = driver
     self.html = HtmlProxy(self.driver)
     self.menu = MainMenuProxy(self.driver)
     self.usersAssert = UserAssert(self.html, self.driver)
Пример #7
0
 def __init__(self, driver):
     self.driver = driver
     self.html = HtmlProxy(self.driver)
     self.menu = MainMenuProxy(self.driver)
     self.clientAssert = ClientManagementAssert(self.html, self.driver)