Commit 42699799 by linguangwei

review

parent 6d2fc240
......@@ -4,11 +4,9 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="00f4febb-36b6-426d-bfe6-b023876a617e" name="Default Changelist" comment="增加了调试中的切换环境方法">
<list default="true" id="00f4febb-36b6-426d-bfe6-b023876a617e" name="Default Changelist" comment="请求头添加enterpriseId,并且设置各个请求头参数为变量,在config.ini中设置">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/config.ini" beforeDir="false" afterPath="$PROJECT_DIR$/config/config.ini" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/readConfig.py" beforeDir="false" afterPath="$PROJECT_DIR$/config/readConfig.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/framework/common.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/framework/common.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/pageobject/basepage.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/pageobject/basepage.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
......@@ -162,7 +160,7 @@
<recent name="C:\Users\Administrator\PycharmProjects\xm-uitest-live" />
</key>
</component>
<component name="RunManager" selected="Python.demo">
<component name="RunManager" selected="Python tests.pytest for test_WhiteBoardPage.TestLivePage">
<configuration name="demo" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="xm-uitest-live" />
<option name="INTERPRETER_OPTIONS" value="" />
......@@ -250,9 +248,9 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="Python tests.pytest for test_WhiteBoardPage.TestLivePage" />
<item itemvalue="Python.demo" />
<item itemvalue="Python tests.pytest for test_WhiteBoardPage.TestLivePage.testWhiteBoard" />
<item itemvalue="Python tests.pytest for test_WhiteBoardPage.TestLivePage" />
<item itemvalue="Python tests.pytest for test_LoginPage.TestLoginPage.testLogin" />
<item itemvalue="Python tests.pytest for test_LoginPage.TestLoginPage" />
</list>
......@@ -452,7 +450,14 @@
<option name="project" value="LOCAL" />
<updated>1625640405518</updated>
</task>
<option name="localTasksCounter" value="26" />
<task id="LOCAL-00026" summary="请求头添加enterpriseId,并且设置各个请求头参数为变量,在config.ini中设置">
<created>1625646987045</created>
<option name="number" value="00026" />
<option name="presentableId" value="LOCAL-00026" />
<option name="project" value="LOCAL" />
<updated>1625646987045</updated>
</task>
<option name="localTasksCounter" value="27" />
<servers />
</component>
<component name="TestHistory">
......@@ -568,7 +573,8 @@
<MESSAGE value="review" />
<MESSAGE value="添加本地文件路径区分mac/windows" />
<MESSAGE value="增加了调试中的切换环境方法" />
<option name="LAST_COMMIT_MESSAGE" value="增加了调试中的切换环境方法" />
<MESSAGE value="请求头添加enterpriseId,并且设置各个请求头参数为变量,在config.ini中设置" />
<option name="LAST_COMMIT_MESSAGE" value="请求头添加enterpriseId,并且设置各个请求头参数为变量,在config.ini中设置" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/server.log" />
......
......@@ -35,5 +35,5 @@ def test_password():
def test_header():
return_test = config.get("header_require", "lgw_header")
return_test = config.get("header_require", "lgw-b")
return json.loads(return_test)
......@@ -150,23 +150,29 @@ class Page(object):
def login(self):
driver = self.driver
login_page = Page(driver=driver)
# # 手机号登录按钮
# phone_login = (By.ID, "rc-tabs-0-tab-2")
# 手机号登录按钮
phone_login = (By.ID, "rc-tabs-0-tab-2")
# 账号输入框
account_input = (By.ID, "xmphone")
# 密码输入框
password_input = (By.ID, "xmpwd")
# 登录按钮
login_button = (By.CLASS_NAME, "submit")
# login_page.click(phone_login)
env = readConfig.get_env()
login_page.get_env_window()
login_page.click_text(env)
login_page.excute_script("form xm_phone_login")
login_page.sleep(2)
login_page.click(phone_login)
# env = readConfig.get_env()
# login_page.get_env_window()
# login_page.click_what('span', 'text()', self.env)
# login_page.click_close_env_window()
# login_page.click_text(env)
# 执行脚本,隐藏的手机号码输入框弹出
# login_page.excute_script("form xm_phone_login")
# login_page.sleep(2)
login_page.input_text(account_input, readConfig.test_account())
login_page.input_text(password_input, readConfig.test_password())
login_page.click(login_button)
login_page.sleep(2)
login_page.click_text("取 消")
login_page.sleep(3)
# 鼠标键盘操作
# 拖拽元素,从sourse元素开始拖拽(x,y)像素
......
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