Introduction to Ruby and waitr

Source: Internet
Author: User

In the previous section, we talked about how to set up the ruby + watir automated testing environment. In this section, I will learn more about harruby and watir.

Ruby features

The development of computer programming languages is always closely related to the rapidly changing world. Ruby emerged to adapt to changes, improve and improve programming art.

L fully open-source

L multi-platform Ruby can run in Linux, UNIX, windows, MS-DOS, BEOs, OS/2...

L multi-threaded threads are the functions that can process several control flows in a program. Unlike the process provided by the OS, threads can share memory space.

L completely object-oriented

L memory management is not required. Garbage collect and GC functions are available to automatically recycle objects that are no longer in use.

L explain and execute the program without compilation.

L powerful string operations/Regular Expressions

L Exception Handling

L you can directly access OS Ruby and use the vast majority of system calls (UNIX. You can also use Ruby for system programming.

L The ruby variable in the dynamic type language has no type, so you don't have to worry about type matching.

L when the dynamic language program is running, you can add new attributes, behaviors, or rewrite methods.

L support operator Rewriting

L it is easy to support numbers with infinite precision, for example, to calculate a factorial of 400.

L rich library functions

L mix-in Ruby removes multiple inheritance but has the hybrid insertion function. Use modules to share data and methods beyond the limitations of classes.

L The syntax is simple. It is a scripting language with no pointer and a low learning curve.

To sum up, Ruby draws on Perl regular expressions, Python's simplicity and readability, Smalltalk's pure object-oriented syntax and single inheritance, LISP's infinitely nested syntax, Java's thread...

Watir Introduction

Watir encapsulates a mechanism for identifying web page elements. Testers can use Ruby to identify objects based on their attributes, and then write Ruby code to control the test logic, add checkpoints and so on to achieve automated testing, and have the advantages of customizing the framework and test logic at will.

 

Related Article

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.