Robot Framework Simple Web site compatibility test
Introduction to the 0.Robot Framework
The Robot framework is a common automated testing framework for "acceptance testing" and "acceptance test driven Development (ATDD)" (ATDD is described in detail in other articles). It uses tabular test data syntax and implements a keyword-driven test strategy. Its testing capabilities can be extended using test libraries, which can be written using Python or Java methods, and users can extend new keywords from existing keywords.
1. Simple website Compatibility test
In this example, we will use Robotframework to operate different browsers to open baidu.com, to search for keywords, to the search results page. Then watch the results for a simple test of browser compatibility.
A) After the ride installation is complete, the DOS command input ride.py
b) Run
c) New project, note type selection as Directory
d) Right-click on the project and create a new test Suite
e) Right-click on the Testsuite and create a new testcase
f) Before writing the test case, we need to import the required library selenium2library, click Testsuite, click the Library button in the Edit tab
g) The name of the library is filled in selenium2library
h) After the first time the library is added, the text of the library may be red, indicating that the library is not found and requires a reboot of the ride to reload the library. If it is still not red, it means that the library does not exist and needs to be reinstalled.
i) Start writing test cases, press the F5 key to search for keywords, find keywords to use, or view all keywords.
j) Writing use case scripts
A. Open the browser to enter Baidu homepage
B. Enter the search text in the search box "to test"
C. Click the Search button
d. Wait 2s
E. Conduct
F. Close the browser
k) Run the test, wait for the test to execute, and view the test results
Robot Framework Simple Web site compatibility test