from selenium import webdriver
import pytest
import time

from TestCases.test_3_customersDetails import TestCustomersDetails as tcd
from PageObjects.customersDetails_page import CustomersDetailsPage as cdp
from TestDatas import global_datas as gd
from PageLocators.login_page_locs import LoginPageLocs as loc
from Common.basepage import Basepage


driver = webdriver.Chrome()
driver.maximize_window()
driver.get(gd.login_url)
base = Basepage(driver)

base.input_text(loc.username_loc, "登录页面_输入用户名", gd.user[0])
base.input_text(loc.password_loc, "登录页面_输入密码", gd.user[1])
base.click_element(loc.login_button_loc, "登录页面_点击登录按钮")
time.sleep(5)

driver.get("http://middle-platform.galaxy-immi.com:8183/Customer/CustomersDetails?customer_id=1004865&active_name=customer_follow&group_id=1")
# tcd().test_editor_mark(driver)
tcd().test_add_customer_contract(driver)
tcd().test_add_order(driver)
