test_list_page.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. @File : login_page.py
  5. @Time : 2024/11/21 08:56:19
  6. @Author : dulip3ng
  7. @Version : 1.0
  8. @Desc : None
  9. '''
  10. from common.condition_row import ConditionRow
  11. def test_check_line_by_rows(list_page, home_page, filter_page):
  12. home_page.search_bill("销售订单列表")
  13. list_page.click_button("过滤")
  14. cond1 = ConditionRow(1, "单据编号", "XSDD2411020023", logic="或者")
  15. cond2 = ConditionRow(2, "单据编号", "XSDD2411020024")
  16. filter_page.filter(cond1, cond2)
  17. list_page.check_line_by_rows(1)
  18. list_page.check_line_by_rows(2,3)
  19. def test_get_value(list_page):
  20. value = list_page.get_value("衬衣订单号", 1)
  21. assert value is not None
  22. def test_get_bill_no(list_page):
  23. value = list_page.get_bill_no(1)
  24. assert value is not None
  25. def test_get_row_count(list_page):
  26. value = list_page.get_row_count()
  27. assert value is not None
  28. def test_field_filter(list_page):
  29. list_page.field_filter("销售类别", "外销")
  30. def test_check_line_by_field_value(list_page):
  31. list_page.check_line_by_field_value("销售类别", "外销")
  32. def test_open_bill_by_row(list_page):
  33. list_page.open_bill_by_row(1)
  34. def test_click_button(list_page, head_page, home_page):
  35. home_page.change_bill_tab("销售订单列表")
  36. list_page.click_button("刷新")
  37. list_page.click_button("业务查询", "预收查询")