Novice Learning Selenium Road map (old driver hand-drawn)

Source: Internet
Author: User
Tags xpath

Objective:

Recently there are a lot of small white, want to start selenium, but have not found the learning route, has not been getting lost, so small compiled hand-drawn a study road map. Hope to help small white quick start, help has been getting started, improve as soon as possible!

Learning selenium mainly divided into five stages, at which level, can be under the seat.

First stage: Kindergarten 1. Choose a language: Before learning to automate, to choose a language to learn, rather than choose what tools, learning selenium, the most popular is Java and Python, as to choose which, see their hobbies, here do not say which language good (PHP is the best language). The small part is halfway decent, there is no language foundation, so the selected python as a scripting language for automation.

2.python: After choosing a language, the next step is to learn the basics of grammar, the current market Python script is divided into 2: Python2 and Python3, the difference is not very big, novice words suggest Python2 Bar, Have a certain problem-solving ability of small partners can directly start Python3

3.python Base: After choosing the Python version, the next is the basic Python learning, Python's basic tutorial is now a very mature tutorial online, suitable for beginners tutorial small recommended 2: The first one is Liao Xuefeng, this can be said to be relatively mature in the country, and suitable for small white introductory course http://www.liaoxuefeng.com/; another website is the Python rookie tutorial http://www.runoob.com/python/python-tutorial.html. The basics include: print, variables, data types, for, if, and while these basic understanding, almost ready to get started.

4.selenium: Next is to learn selenium, selenium currently has three version: SELENIUM1 is selenium RC This is already very old, do not waste time to study; then selenium2, this is the most popular now Recently out of the selenium3, in fact, selenium2 difference is not small, mainly to start Firefox will encounter two pits, just start the small white estimate stepped into the pit will not climb up. Try the next, finally, the environment is set up, the results of Firefox error, it is a pot of cold water poured over. Finally solved the front of a hole, and then there is a second pit. So small white start selenium recommended selenium2

Second Stage: Primary School

5.selenium API: Many small partners learning automation like to use the recording tool first, to learn automation recording is the most unreliable, for example: If the ID of an element is dynamic, you recorded this time, playback, the element ID has changed, this time no matter how you play back is not successful. So record this thing, understand the principle can be, do not take the time to study. To learn selenium, we go directly to the API documentation on the line.

6. Element positioning: Selenium provides eight element positioning: ID, Name, class, Tag, Link, patail_link, XPath, CSS. For the element positioning is not very understanding of this time need to use Firepath and firebug to assist the positioning, it is necessary to add the knowledge of HTML, the more familiar with the HTML, you locate the element faster. First through the simple element property positioning, and then you find that some elements of the attributes are not, or a lot of repetition, by our development classmates not standard code pits do not want, this time you have to learn XPath

7.xpath:xpath positioning can basically solve the problem of 80% of the element positioning, but also not omnipotent, a lot of small partners just contact time, is simply as treasure. XPath can be regarded as the location of the Blades Dragon Slayer, although powerful, but relatively cumbersome, positioning elements slow, syntax is very long, not stable, but also by the pit do not, this time it is necessary to learn the next CSS

Stage Three: Secondary school

8.css:css positioning speed, stable quasi-ruthless, positioning the sky Sword, light, simple grammar. But also not omnipotent, some fuzzy matching place, still have to rely on the XPath brother to take care of

9. Operating elements: After positioning the elements, the next is the operation element, the main problem is the mouse events and keyboard events

10. Judging elements: After the operation is done, it is to get the return result, or to determine whether the element is expected to be the result

11.unittest: The front is simple operation, unable to produce test cases, it is time to find a test framework to help us run the use case, so rely on unittest

12. Test report: After the use case is finished, there must be a test report, this time need to use the HTML testing report

13. Send mail: After the report is generated, I can not always go to the computer to open the view, it is time to learn to automatically send mail

Stage Three: High School

14. Function: Before the simple use case is set up, when writing the use case, found that each repeat operation more remember Journal, this time to learn the function, the commonly used methods written function call

15. Classes and methods: When the function is written more, found a lot of very convenient, can be used to write to a piece of operations, which calls directly, this time you have to learn classes and methods

16. Parameterization: Use case optimization of the near time, found that the test data want to change, find good trouble, so think of the test data separated out, using the parameterization

17. Data driven: After parameterization, followed by data-driven, use case after writing, only need to maintain the test data can be

Stage four: University

18. Encapsulation: The usual method is already very skilled, this time needs to encapsulate the

19.jenkins: When the use case is written almost, the final thing is to want to be able to execute a key, this time, need to use Jenkins to do continuous integration

20. Code Warehouse: When many people do automation projects, this time requires code synchronization, so you will encounter SVN, git tools

Fifth stage: Postgraduate

21.js: The front selenium things after learning, found a lot of scenes is selenium can not be completed, such as browser scroll bar, this time need to learn JS ...

22. Lifelong learning: The next step is to look at the direction of the individual research.

So here's the question: How do you start with so many things?

Novice Learning Selenium Road map (old driver hand-drawn)

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.