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