selenium learning route

 
1, configure your test environment for you to learn a language, you configure the appropriate selenium test environment. selenium-defined semantics --- like "hello", if you are using Chinese, surgery table hello to your wording is "hello", if you are using English, you wording is "hello". Therefore, the same semantic in different languages ​​have different ways of writing (grammar).
2. Select a development language, now recommends: Python
3, then you need to be familiar webdriver API, API selenium is defined as a method for the various elements on the location and operation of the page.
  First learn positioning elements, selenium provides id, name, class name, tag name, link text, partial link text, xpath, css, and other targeting methods. xpath and css  powerful syntax is slightly more complex, in the meantime you may also want to learn more front-end knowledge. xml, javascript  and so on.
  The purpose is to locate elements of the operating element, then we must learn the various elements of an operation, input boxes, drop-down box, button clicks, file upload, download, page, dialog box, alert box ... and so on.
4, after a period of study, you can test its capability to simulate manual operation of various elements on the page. Then you need to do is to take these "use cases" organized, unified to run.
5, then you need to do is learn and use unit testing framework unit test framework itself solve organizational and operational use cases.
6, when you write a number of "test cases", you will find a large number of use cases repeated operation, can not be written to a separate file, when you need to call these operations? Of course you can, use your programming skills to achieve this point is very simple. Then, you have found that each use case has some data, which is the same, but if the change is very troublesome modifications, you can also read he wrote a separate file.
7, then you have encountered a new question, I wrote the script (use cases) are pipelined, I know how use cases fail or succeed. Then you need to add some validation to the assertions in the script.
8, then you have more ideas, unit testing framework log too simple, can generate a nice test report came out. I can not timed to run this script. Can the results of each test run scripts directly to my mailbox. Can ......
9, in order to solve these problems, you have to learn more about programming techniques, then your "test structure" will be more powerful, more flexible. It produced a certain versatility and portability. A kind of mold test automation framework was born.
Editor: Mushishi

Guess you like

Origin www.cnblogs.com/TomBombadil/p/10972902.html