test_list_page.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. import pytest
  11. from playwright.sync_api import Page
  12. @pytest.fixture(scope="module", autouse=True)
  13. def open_bill(page: Page, login_page, home_page):
  14. page.goto("http://10.201.3.146/k3cloud/html5/")
  15. login_page.login('LTTC1103', '杜立朋', 'lt_k31233')
  16. home_page.search_bill("销售订单列表")
  17. def test_check_line_by_rows(page, list_page):
  18. list_page.check_line_by_rows(1)
  19. list_page.check_line_by_rows(2,3)
  20. def test_get_value(page, list_page):
  21. value = list_page.get_value("衬衣订单号", 1)
  22. assert value is not None
  23. def test_get_bill_no(page, list_page):
  24. value = list_page.get_bill_no(1)
  25. assert value is not None
  26. def test_get_row_count(page, list_page):
  27. value = list_page.get_row_count()
  28. assert value is not None
  29. def test_field_filter(page, list_page):
  30. list_page.field_filter("销售类别", "外销")
  31. def test_check_line_by_field_value(page, list_page):
  32. list_page.check_line_by_field_value("销售类别", "外销")
  33. def test_open_bill_by_row(page, list_page):
  34. list_page.open_bill_by_row(1)
  35. def test_click_button(page, list_page, head_page, home_page):
  36. home_page.change_bill_tab("销售订单列表")
  37. list_page.click_button("刷新")
  38. list_page.click_button("业务查询", "预收查询")