あなたは
チェックボックスの状態を保存するためにstoreChecked
を使用することができますのif-elseのために、私はにisChecked(ロケータ)
引数から生成された(ロケータ、variableNameに)
storeChecked SelBlocksプラグインを使用しています
を
locator - an element locator pointing to a checkbox or radio button
返品:
true if the checkbox is checked, false otherwise
トグルボタン(チェックボックス/ラジオ)がオンになっているかどうかを取得します。指定された要素が存在しないか、トグルボタンでない場合に失敗します。
<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>
ハローあなたの助けのためのTHXあなたを、どのようにチェックボックスが、その後OFFである場合、私はチェックし、それをオンにし、そのチェックボックスがONであれば、ただ何もできない... – mytrasher
@mytrasherは[条件文でこれを参照しています](http://stackoverflow.com/questions/10498966/how-can-i-organize-if-else-selenium-ide) – Madhan
@mytrasher [あなたは答えを受け入れることができます( http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work/5235#5235) – Madhan