"Turn" Selenium learning route

Source: Internet
Author: User

Selenium Learning Route

Configure your test environment, really for the language you are learning, to configure your corresponding selenium test environment. Selenium is like the definition of semantic---"hello", if you are using Chinese, to say hello to the table, your writing is "Hello", if you use English, you are written "Hello." Therefore, there are different semantics in different languages (syntax).

Then you need to be familiar with the Webdriver API, the API is a method defined by selenium, used to locate, manipulate the various elements on the page.

To learn the positioning of the element first, selenium provides the ID, name, class name, tag name, link text, Partial link text, XPath, CSS, and other positioning methods. The powerful syntax for XPath and CSS is slightly more complex, and you may need to know more about the front-end knowledge in the meantime. XML, JavaScript, and so on.

The purpose of positioning elements is to manipulate elements, then learn the various elements have operation, input box, drop-down box, button click, file Upload, download, pagination, dialog box, warning box ... and so on.

After a period of learning, you can easily simulate manual testing to manipulate the various elements on the page. Then all you need to do is to organize these "use cases" and run them together.

So what you need to do is learn and use the Unit test framework, which itself solves the organization and operation of use cases.

After you have written some "test Cases", you will find that there are a number of repeated actions in the use case, can you write to a separate file, and call these actions when needed? Of course, using your programming skills to achieve this will be very simple. Then you find that there are some data in each use case, and the same is true, but if you change it, you can write it in a separate file to read it.

Then you come across new questions, my scripts (use cases) are flowing, and how do I know if a use case fails or succeeds? Then you need to add some validation and assertions to the script.

Then you have more ideas, the Unit Test framework log is too simple, can generate a beautiful test report. Can I run this script on a regular basis? Can I send the test results of every run script directly to my mailbox. Can you ...

To solve these problems, you have to learn more about programming techniques, and then your "test structure" will become more powerful and more flexible. has produced a certain universality and portability. A model-like automated testing framework was born.

If, one day, you no longer do the UI Automation test, you will find that you do a unit test or interface testing is basically no difficulty. Develop a test tool and so on, thank Selenium ! By the way, thank me!

Original address: http://www.cnblogs.com/fnng/p/3653793.html

"Turn" Selenium learning route

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.