Firefox firefox browser install selenium_ide steps and their usage rules

Source: Internet
Author: User
Tags testng

Firefox installation Selenium IDE diagram steps
Step 1: Use Firefox browser to enter Selenium official website, address £ http://docs.seleniumhq.org/, click Download Selenium, as shown in the figure below;






Step 2. Once installed, you can see it in the add-ons in Firefox, as shown in the following figure:

After the installation is complete,

Click the red button to record, then save and then end, click the red button to finish recording, then click on the left green to run.

Summary of Experience
As a novice who has not been in touch with selenium before, it will be quicker to learn if you have previous experience writing code. But at any rate, it's always harder to start.
I also from a close to pure 24K small white grew up, step by step, in this process I learned a lot of new knowledge, with a new breakthrough, new growth, continuous efforts, constantly try, and constantly experience, let me go to today, the future, there are many ways to go. No hesitation, my test road.
So, today time to review my selenium learning process, that is, selenium automated test How to start, these, is my personal experience, share out for everyone reference.
1. At first, a lot of people started with the Selenium IDE recording script, and so did I. One book is very well written: Selenium Beginner's Guide. So, from recording playback to start my selenium, and in this process, continue to add my HTML CSS knowledge, familiar with the selenium API.
2. Slowly, found that the recorded script in the replay often error, through the inspection found that the location of the error, resulting in this location error is the biggest cause of the system's front-end adoption of some kind of framework, such as TIGERUI,EXJ .... So the tags inside the HTML are dynamic, such as Id,class, Name This is fatal to the automation of the elements that operate the selenium.
3. So, it's already necessary to start writing your own positioning information. Thus learning the xpth and CSS selectors, mastered more efficient, fast and stable positioning of the elements on the page (the location of the time will inevitably encounter an IFRAME, which must first switch to the IFRAME and then positioning). That is, write the script on the Selenium IDE.
4. Confidently wrote a long script on the Selenium IDE, and ran repeatedly to succeed. Finally tasted a little bit of happy taste. And then, the problem comes, when I want to modify and extend this script, only to find that the efficiency is quite low. A sentence to check. A sentence change. How painful it is to comprehend.
5. In addition, the selenium IDE is started by default Firefox, the browser will always error when using selenium RC to run the IE running script. All kinds of uncertain, all kinds of not calm. decided to abandon the use of the IDE.
6. One of the great things about selenium is that it supports multiple languages: Java,c#,python and so on, and can convert recorded scripts into code. I use Java, decisive walk.
7. Needless to say, of course, the script has been converted into Java code and started again in Eclipse.
8. Select a test framework: there are JUnit and testng two options, the company is using JUnit, so, needless to say, I use JUnit to verify the results of the selenium script run. Also, both JUnit and testng can generate more intuitive test reports.
9. Write some code, and you'll see that the entire code is populated with the same code: start encapsulating the code. Encapsulate common APIs in the API. The code looks much more comfortable after the package is ready.
10. Next, it is not necessary to put the location information in the code with a special file, and then to read the positioning information inside, so that the maintenance code and maintain positioning information in two places, do not always stick in the code and location path, simply split the layer. Make a decisive attempt.
11. Here, the script is written out, the common API is encapsulated, the location path is separated. The whole code is much more concise. It's easier and more comfortable to write. At this time, the personalization of their own framework, here, temporarily do not write down, has been away from how to start selenium quite far away. Perhaps, in this step, you have your own idea of the test framework and how to design the script .... Come on, turn the idea into a real motive and move on.

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.