Robot Framework Simple Web site compatibility test

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.