--dist=loadscope: tests will be grouped by module for test functions and by class for test methods, then each group will be sent to an available worker, guaranteeing that all tests in a group run in the same process. This can be useful if you have expensive module-level or class-level fixtures. Currently the groupings can’t be customized, with grouping by class takes priority over grouping by module. This feature was added in version 1.19.
--dist=loadfile: tests will be grouped by file name, and then will be sent to an available worker, guaranteeing that all tests in a group run in the same worker. This feature was added in version 1.21.
return element.click()
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
def get_element(self, path_type, element_path, custom_time_out=None,):
"""
:param path_type: тип локатора
:param element_path: путь элемента
:return:
"""
__type = {
'xpath': By.XPATH,
'css': By.CSS_SELECTOR,
'id': By.ID,
'class': By.CLASS_NAME
}
if custom_time_out is not None:
time_out = custom_time_out
else:
time_out = self.time_out
return WebDriverWait(self.driver, time_out).until(expected_conditions.presence_of_element_located((__type.get(path_type), element_path)))
"//option[contains(text(), 'Продам')]/parent::select"