Robot framework example: 126 mailbox login

 

1. Script structure introduction:

The login module is divided into three layers: test suite (including test cases), element layer, and process layer. The operation is as follows:

1.1) New module login: Right-click on the current project and select new directory

 1.2) Create a new file-type login_suite test suite: right-click on the module login and select new suite

1.3) Create a new element layer resource: right-click on the module login and select new resource file

1.4) Create a new process layer resource: right-click on the module login and select new resource file

2. Add user keywords to element layer login_ele.robot

2.1) login_ele.robot imports the SeleniumLibrary library. Black indicates successful import

2.2) Create the following keywords in sequence:

 


 

 


 


 


 


 


 


 


 

3. Add user keywords to login_flow.robot in the process layer

3.1) Import element layer resource, login_ele.robot

3.2) Create the following keywords





4. Test Suite

4.1) Added 2 test cases


5. After saving the script, run the log.

6. Summary:

Variable comparison format: '${expectinfo}'=='${errinfo}', single quotes should be added before and after the variable name;

run keyword if  runs multiple statements: run keyword if   condition  run keywords log 1 AND log 2 (AND uppercase)

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325680949&siteId=291194637