From 4aabdde23b063c90098469ff9396e45ce10faef6 Mon Sep 17 00:00:00 2001 From: LG_lai Date: Fri, 8 Mar 2024 10:00:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- OprLogin/Login/Login01.robot | 14 ++++++++++++++ OprLogin/Resource.robot | 18 ++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 OprLogin/Login/Login01.robot create mode 100644 OprLogin/Resource.robot diff --git a/OprLogin/Login/Login01.robot b/OprLogin/Login/Login01.robot new file mode 100644 index 0000000..b48f6e0 --- /dev/null +++ b/OprLogin/Login/Login01.robot @@ -0,0 +1,14 @@ +*** Settings *** +Library Selenium2Library +Resource ../Resource.robot + +*** Variables *** +${Login_URL} https://opr-center-test.qniao.cn/#/user/login + +*** Test Cases *** +LoginCase + Given User open Chrome with the url "${Login_URL}" + When User Login System with "15014242835" and "888888" + #Then Should Contain ${title} 首页 - 运营中心 + AND Sleep 2s + THEN Close Browser diff --git a/OprLogin/Resource.robot b/OprLogin/Resource.robot new file mode 100644 index 0000000..3421799 --- /dev/null +++ b/OprLogin/Resource.robot @@ -0,0 +1,18 @@ +*** Settings *** +Library urllib3 +Library Collections +Library RequestsLibrary +Library DatabaseLibrary +Library Selenium2Library + +*** Keywords *** +User open Chrome with the url "${URL}" + Open Browser ${URL} Chrome + +User Login System with "${account}" and "${password}" + Input Text xpath=//*[@id="app"]/div/div/div[2]/div/div/div/div[2]/input ${account} + Input Text xpath=//*[@id="app"]/div/div/div[2]/div/div/div/div[2]/div[2]/input ${password} + Click Button xpath=//*[@class="ant-btn ant-btn-primary ant-btn-block"] + Evaluate time.sleep(2) time + ${title} get title + Close Browser