尝试一个简单的 Selenium 脚本在 Google 上搜索 Wikipedia

先决条件:

打开插件。必须显示一个显示红色圆圈的按钮。如果按下它,则表示你可以启动你的方案。该插件正在记录你在此 Firefox 实例中执行的所有操作。
做你想要录制的任何事情。
最后,保存你的场景; 你会注意到 Selenium IDE 的场景是 html 文件。
你还可以打开其他用户的文件。例如,将下面的代码复制并粘贴到新的 html 文件中,然后通过插件导入。你将能够运行非常简单的方案。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="https://www.google.com/" />
<title>sample-test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">sample-test</td></tr>
</thead><tbody>
<tr>
    <td>open</td>
    <td>/</td>
    <td></td>
</tr>
<tr>
    <td>type</td>
    <td>id=lst-ib</td>
    <td>Wikipedia</td>
</tr>
</tbody></table>
</body>
</html>

这种 DSL(领域特定语言)通常被称为 selenese
其中最常见的功能列于此处