Selenium IDE 复选框勾选标识
Selenium IDE checkbox checked identification
我正在学习如何使用 Selenium IDE,我认为它进展顺利,但现在我似乎无法找到如何选中该页面上的复选框。
https://www.otelo.de/warenkorb.html?id=-1
我似乎不知道如何查看复选框是否被选中
selenium ide 唯一显示给我的是 id=mnp
如果我尝试记录它
你能帮帮我,告诉我我做错了什么吗?
非常感谢你!
我使用了 SelBlocks If-Else 插件 您可以使用 storeChecked
来存储复选框的状态
storeChecked(locator, variableName)
Generated from isChecked(locator)
Arguments:
locator - an element locator pointing to a checkbox or radio button
Returns:
true if the checkbox is checked, false otherwise
Gets whether a toggle-button (checkbox/radio) is checked. Fails if the specified element doesn't exist or isn't a toggle-button.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title>IfElse</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">IfElse</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>https://www.otelo.de/warenkorb.html?id=-1</td>
<td></td>
</tr>
<tr>
<td>storeChecked</td>
<td>id=mnp</td>
<td>state</td>
</tr>
<tr>
<td>if</td>
<td>${state}==false</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=mnp</td>
<td></td>
</tr>
<tr>
<td>endIf</td>
<td></td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
我正在学习如何使用 Selenium IDE,我认为它进展顺利,但现在我似乎无法找到如何选中该页面上的复选框。
https://www.otelo.de/warenkorb.html?id=-1
我似乎不知道如何查看复选框是否被选中
selenium ide 唯一显示给我的是 id=mnp
如果我尝试记录它
你能帮帮我,告诉我我做错了什么吗?
非常感谢你!
我使用了 SelBlocks If-Else 插件 您可以使用 storeChecked
来存储复选框的状态
storeChecked(locator, variableName)
Generated from isChecked(locator)
Arguments:locator - an element locator pointing to a checkbox or radio button
Returns:
true if the checkbox is checked, false otherwise
Gets whether a toggle-button (checkbox/radio) is checked. Fails if the specified element doesn't exist or isn't a toggle-button.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title>IfElse</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">IfElse</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>https://www.otelo.de/warenkorb.html?id=-1</td>
<td></td>
</tr>
<tr>
<td>storeChecked</td>
<td>id=mnp</td>
<td>state</td>
</tr>
<tr>
<td>if</td>
<td>${state}==false</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=mnp</td>
<td></td>
</tr>
<tr>
<td>endIf</td>
<td></td>
<td></td>
</tr>
</tbody></table>
</body>
</html>