Commit 97a5a90e authored by Bozhong钟波's avatar Bozhong钟波

测试

parent f5c9e675
......@@ -18,6 +18,7 @@ class CustomersDetailsPage(Basepage):
# 进入 客户跟进 菜单,进行评分操作
def editor_mark(self):
time.sleep(1)
self.click_element(loc.mark_button_loc, "客户跟进页面_点击编辑顾问评分")
self.click_element(loc.age_select_loc, "展开年龄下拉框")
......@@ -42,6 +43,7 @@ class CustomersDetailsPage(Basepage):
# 判断评分操作是否成功,分数需要大于80
def is_mark_success(self):
time.sleep(1)
# 文本内容
mark = self.get_text(loc.mark_text_loc, "客户跟进页面_获取顾问评分文本")
# 定义正则表达式
......
......@@ -25,6 +25,7 @@ class MyClientPage(Basepage):
# 填写 客户信息 新增客户
def newClient(self):
time.sleep(1)
self.click_element(loc.addClient_button_loc, "我的客户页面_点击新增客户按钮")
self.input_text(loc.customer_name_loc, "新增客户页面_输入客户姓名", gd.client_info["username"])
self.input_text(loc.mobile_loc, "新增客户页面_输入手机号码", gd.client_info["mobile"])
......
......@@ -10,7 +10,7 @@ from TestDatas import global_datas as gd
from PageObjects.login_page import LoginPage
@pytest.fixture(scope="class")
@pytest.fixture(scope="session")
# 打开浏览器,访问登录页面
def init():
print(1)
......
......@@ -18,11 +18,6 @@ class TestMyClient:
# 断言
assert MyClientPage(init).is_myClient_exist()
# 点击 新增客户 按钮
def test_click_newClient_button(self, init):
time.sleep(2)
MyClientPage(init).click_newClient_button()
# 填写 客户信息 创建客户
def test_newClient(self, init):
MyClientPage(init).newClient()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment