Browse Source

样例

master
LG_lai 2 years ago
parent
commit
4aabdde23b
2 changed files with 32 additions and 0 deletions
  1. 14
      OprLogin/Login/Login01.robot
  2. 18
      OprLogin/Resource.robot

14
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

18
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
Loading…
Cancel
Save