1234567891011121314151617181920212223242526272829 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- '''
- @File : list_page_locator.py
- @Time : 2024/11/20 17:03:52
- @Author : dulip3ng
- @Version : 1.0
- @Desc : None
- '''
- class ListPageLocator:
- BUTTON_ARGS_LOC = "(//div[contains(@id, '-FMAINTAB_c-') and @class='k-content k-state-active']//div[contains(@id, '-BILLMENU_TOOLBAR')]/ul/li[contains(@class, 'k-item k-state-default kdmenuitem') and not(contains(@class, 'kd-menubtn-disabled'))]/span/span[text()='%s'])[%d]";
- SUB_BUTTON_ARGS_LOC = "//div[@class = 'k-animation-container' and contains(@style, 'display: block')]/descendant::span[contains(@id, 'BILLMENU_TOOLBAR') and text() = '%s']";
- GRANDSON_BUTTON_ARGS_LOC = "//div[@class = 'k-animation-container' and contains(@style, 'display: block')]/descendant::span[contains(@id, 'BILLMENU_TOOLBAR') and text() = '%s']/../../descendant::span[@title = '%s']";
- WAITING_LOC = "//div[contains(@id, '-FMAINTAB_c-') and @class='k-content k-state-active']//div[substring(@id,string-length(@id)-14)='FLIST-gridPanel']/descendant::tbody[@role = 'rowgroup']/tr/td";
- ROW_DATA_ARGS_LOC = "(//div[contains(@id, '-FMAINTAB_c-') and @class='k-content k-state-active']//div[substring(@id,string-length(@id)-14)='FLIST-gridPanel']/descendant::tbody[@role = 'rowgroup']/tr/td/div/input/parent::div)[%d]";
- ALL_LINE_CHECKBOX_LOC = "//div[contains(@id, '-FMAINTAB_c-') and @class='k-content k-state-active']//div[substring(@id,string-length(@id)-14)='FLIST-gridPanel']/descendant::div[@class='k-grid-header-wrap k-auto-scrollable']/table/thead/tr/th//span[@class='kd-grid-selector']";
- BILL_NO_FIELD_ARGS_LOC = "//div[contains(@id, '-FMAINTAB_c-') and @class='k-content k-state-active']//td/span[@data-field=//th[@data-title='单据编号']/@data-field and @data-rowid = '%d']";
- ROW_FIELD_VALUE_ARGS_LOC = "//div[contains(@id, '-FMAINTAB_c-') and @class='k-content k-state-active']//div[contains(@id, '-FLIST-c')]//span[@data-field=//th[@data-title='%s']/@data-field and @data-rowid='%d']";
- BILL_NO_FIELD_VALUE_ARGS_LOC = "//div[contains(@id, '-FMAINTAB_c-') and @class='k-content k-state-active']//div[contains(@id, '-FLIST-c')]//span[@data-field=//th[@data-title='单据编号']/@data-field and @data-rowid='%d']/a";
- LIST_ALL_LINE_LOC = "//div[contains(@id, '-FMAINTAB_c-') and @class='k-content k-state-active']//div[substring(@id,string-length(@id)-14)='FLIST-gridPanel']/descendant::tbody[@role = 'rowgroup']/tr/td/div[@class = 'kd-grid-celldiv kd-grid-selector ']";
- FIELDS_VALUE_ARGS_LOC = "//div[contains(@id, '-FMAINTAB_c-') and @class='k-content k-state-active']//div[contains(@id, '-FLIST-c')]//span[@data-field=//th[@data-title='%s']/@data-field and text() = '%s']";
- FIELD_FILTER_ARGS_LOC = "//div[contains(@id, '-FMAINTAB_c-') and @class='k-content k-state-active']//div[contains(@id, '-FLIST-c')]//th[@data-title='%s']";
- FILTER_ICON_ARGS_LOC = "//div[contains(@id, '-FMAINTAB_c-') and @class='k-content k-state-active']//div[contains(@id, '-FLIST-c')]//th[@data-title='%s']/a/span[@class = 'k-icon k-i-filter']";
- FILTER_VALUE_ARGS_LOC = "//div[@class = 'k-animation-container kd-grid-filterMenu' and contains(@style, 'display: block')]/form/ul/li/label[text() = '%s']";
- FILTER_OK_BTN = "//div[@class = 'k-animation-container kd-grid-filterMenu' and contains(@style, 'display: block')]/form/button[text() = '确定']";
- ROW_DATA_PUSH_LOC = "(//div[contains(@id, '-FMAINTAB_c-') and @class='k-content k-state-active']//div[contains(@id,'FRESULTLIST-gridPane')]/descendant::tbody[@role = 'rowgroup']/tr)[%d]";
|