我使用 selenium ide 记录了一个测试。根据应用程序的要求,测试用例在执行后应该显示错误,但它在 selenium ide 中执行而没有显示错误。那么是应用程序无法正常工作还是我没有正确记录测试???
<?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://example.com/" />
<title>enerc2</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">enerc2</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>www.example.com/index/admin</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>//div[@id='site-grid']/table/thead/tr[2]/td[2]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>css=thead > tr > #site-grid_c1 > a[title="Fuel Level after last fueling (Tank Capacity)"]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>name=Site[Tank_Capacity]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>name=Site[Tank_Capacity]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=Site[Tank_Capacity]</td>
<td>123</td>
</tr>
<tr>
<td>click</td>
<td>name=Site[Tank_Capacity]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=Site[Tank_Capacity]</td>
<td><></td>
</tr>
<tr>
<td>click</td>
<td>name=Site[Tank_Capacity]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>name=Site[Tank_Capacity]</td>
<td><>+-</td>
</tr>
<tr>
<td>click</td>
<td>name=Site[Tank_Capacity]</td>
<td></td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>css=div.summary</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>