Realization of automatic screenshot based on selenium Webdriver in multi-language environment

Source: Internet
Author: User

The concept of TVT and the necessity of TVT automation

Concept

Translation Verification Testing (translation verification TESTING,TVT) is a test link for IBM's GSSC department to Localize (Localization) various IBM products. As we all know, we have developed a product that needs to be accessible to users around the world, and it is necessary to translate product UI and related documents into various languages so that users in different countries and regions can use them smoothly. The process of TVT is a process of product translation verification testing.

Necessity

Literally, TVT is a relatively simple translation verification process, but within the GSSC, there is a complex process to complete the process. In these processes, there is a duplication and a large amount of work is the screenshot. The screenshot is to intercept and save all language versions of the UI and related documents in the picture, and then issue the Tester to each country to verify (verification) the correctness of the translations.

We can calculate the workload of screenshots, if a product to do 20 language version, then a case needs to take a screenshot of 20, if a project has 1000 case, then GSSC TSE (Test Support Engineer) must intercept 20000 Zhang Tu (20*1000). If you take a screenshot manually, a picture takes about 5 minutes, and the manual screenshot is probably 100/day (60*8/5=96). 10 TSE To complete this work also requires at least 20 days (10 people *100 * 20 days = 20000). So if you can use automation to do these repetitive tasks, record a case script, and then execute in 20 languages, this will save time and labor costs, so automation is very helpful and necessary in TVT.

Selenium Introduction

Selenium is a test framework for WEB applications that supports multiple browsers and multiple programming languages. The main new feature of Selenium 2 is the integration of the Webdriver-once Selenium 1 (also known as Selenium RC) competitor. Selenium RC runs JavaScript applications in browsers, while Webdriver directly controls browsers through native browser support or browser extensions.

Selenium Ide:firefox is a plug-in that supports script recording. In the TVT automatic screenshot work, need to use the Selenium Webdriver and Selenium IDE These two tools, in view of this article mainly introduces the TVT automatic screenshot, the detailed Selenium knowledge, here no longer introduces, everybody may go to its official website to understand more related Knowledge.

To work with the Selenium IDE, you need another Firefox plugin: Firebug, which looks for properties of Web page elements, such as element IDs, Name, Class, CSS, Path, and so on, all of which are Selenium IDE and webdriver need to be used.

Recording and exporting scripts with the Selenium IDE

First you need to download the Selenium IDE, you can download the latest version of the IDE from the Selenium official website, but you need to be aware of the IDE's compatibility with Firefox, which can be read at the time of downloading Selenium IDE's release Notes 。 After downloading, the plugin situation is installed on Firefox.

Start Firefox and enter the URL of the recording site, click on the tools above the menu bar->selenium IDE, Selenium IDE will bounce out. All subsequent operations on Firefox are recorded, such as the system's login process (shown in Figure 1), and when all the steps are completed, click on the Red dot stop button in the upper right corner of the IDE to complete a case script recording.

Figure 1. Record User Login

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.