I tried using Selenium IDE to automate browser testing

Hello.
This is Hase from the development team.

This time, I will introduce Selenium IDE, a tool that automates browser testing

What is Selenium IDE?

Selenium IDE is a tool for automating web browser testing and is provided as an add-on for Firefox.
In addition to Selenium IDE, there is also a library called Selenium WebDriver that allows you to test from within a program.

Source: Various introductions to Selenium IDE

Although it is provided as an add-on for FireFox, this tool can also be used with other browsers such as Chrome and Internet Explorer.
We will introduce how to use it with Chrome and Internet Explorer next time.

introduction

Since we will be using FireFox as the browser this time, we will proceed under the assumption that FireFox is installed on your PC

this page and click "+ Add to Firefox" to install Selenium IDE.

That's all you need to install.
It's that easy!

How to use

For example, let's create the following test:

1. Go to https://www.yahoo.co.jp/
2. Search for "biyondo Co., Ltd."
3. The search results will say "Is this Beyond Co., Ltd."

Launch Selenium IDE

Select Menu Bar → Tools → Selenium IDE to launch it

Start recording

Enable the red circle (record button) in the top right corner to start recording

Controlling the browser

Operate your browser as usual.
1. Go to https://www.yahoo.co.jp/
2. Enter "biyondo Co., Ltd." and search

Your actions will be recorded in Selenium IDE

We want to confirm that it displays "Is this Beyond Inc.?", so
drag the text, right-click and select "verifyText...".

Now you can test that it is displayed

End recording

You can stop recording by clicking the red circle (record button) in the upper right corner again

Execute

Play the test you created.
Press the play button (▶) and the browser will start automatically.

If the test is successful, it will turn green

Conversely, if the values ​​are incorrect and an error occurs, it will turn red as shown below.

*By changing the value of Verify Text to "Is it Beyond Inc.?", the values ​​did not match and an error occurred.

At the end

This time we created a test by operating the browser, but
of course it is also possible to create one by entering commands directly without operating the browser.

For a list of commands and how to use them, please refer to
the official documentation .

That's all

If you found this article helpful , please give it a like!
0
Loading...
0 votes, average: 0.00 / 10
3,218
X facebook Hatena Bookmark pocket

The person who wrote this article

About the author

Tatsuya Hase

Joined Beyond Co., Ltd. as a new graduate.

We develop web systems (development of services and systems that run on browsers, such as web services, digital content, and business management systems) and game APIs (development of programs that communicate with application games).

We also develop private/custom apps for Shopify.

Originally worked at the Osaka office, but transferred to the Yokohama office in 2019.
His hobbies are baseball/karaoke/anime