Skip to content

Instantly share code, notes, and snippets.

@aligo
Created July 30, 2012 05:18
Show Gist options
  • Save aligo/3204993 to your computer and use it in GitHub Desktop.
Save aligo/3204993 to your computer and use it in GitHub Desktop.
miao
<?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="http://www.gewara.com/register.xhtml" />
<title>Miao</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">New Test</td></tr>
</thead><tbody>
<tr>
<td>getEval</td>
<td>i = Math.round (Math.random() * 65535 * 65535);</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>http://www.gewara.com/register.xhtml</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=email</td>
<td>javascript{&quot;miao&quot;+i+&quot;@miao.com&quot;}</td>
</tr>
<tr>
<td>type</td>
<td>id=nickname</td>
<td>javascript{&quot;miao&quot;+i}</td>
</tr>
<tr>
<td>type</td>
<td>id=password</td>
<td>miaomiao</td>
</tr>
<tr>
<td>type</td>
<td>id=repassword</td>
<td>miaomiao</td>
</tr>
<tr>
<td>type</td>
<td>id=captchaInput</td>
<td>miao</td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>id=captchaImg</td>
<td></td>
</tr>
<tr>
<td>storeEval</td>
<td>prompt(&quot;输入验证码~miao~&quot;)</td>
<td>captcha</td>
</tr>
<tr>
<td>type</td>
<td>id=captchaInput</td>
<td>${captcha}</td>
</tr>
<tr>
<td>verifyElementPresent</td>
<td>css=input[type=&quot;button&quot;]</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>//form[@id='miForm']/div/label</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>http://www.gewara.com/subject/ajax/supportCatPic.xhtml?id=1343197973701XZpAh</td>
<td></td>
</tr>
<tr>
<td>open</td>
<td>http://www.gewara.com/home/member/register2.xhtml</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>link=退出</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment