list_page_locator.py 3.5 KB

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. @File : list_page_locator.py
  5. @Time : 2024/11/20 17:03:52
  6. @Author : dulip3ng
  7. @Version : 1.0
  8. @Desc : None
  9. '''
  10. class ListPageLocator:
  11. 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]";
  12. SUB_BUTTON_ARGS_LOC = "//div[@class = 'k-animation-container' and contains(@style, 'display: block')]/descendant::span[contains(@id, 'BILLMENU_TOOLBAR') and text() = '%s']";
  13. 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']";
  14. 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";
  15. 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]";
  16. 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']";
  17. 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']";
  18. 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']";
  19. 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";
  20. 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 ']";
  21. 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']";
  22. 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']";
  23. 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']";
  24. FILTER_VALUE_ARGS_LOC = "//div[@class = 'k-animation-container kd-grid-filterMenu' and contains(@style, 'display: block')]/form/ul/li/label[text() = '%s']";
  25. FILTER_OK_BTN = "//div[@class = 'k-animation-container kd-grid-filterMenu' and contains(@style, 'display: block')]/form/button[text() = '确定']";
  26. 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]";