Skip to content

Instantly share code, notes, and snippets.

@koichirok
Last active November 12, 2018 05:16
Show Gist options
  • Save koichirok/9ca5a66fb68134b28a7b28eb8dad134b to your computer and use it in GitHub Desktop.
Save koichirok/9ca5a66fb68134b28a7b28eb8dad134b to your computer and use it in GitHub Desktop.
selenese version of source ip address check script
<?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>Check source IP address</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">Check source IP address</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/?hl=en</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=lst-ib</td>
<td>myip</td>
</tr>
<tr>
<td>sendKeysAndWait</td>
<td>id=lst-ib</td>
<td>${KEY_ENTER}</td>
</tr>
<tr>
<td>storeText</td>
<td>css=w-answer &gt; w-answer-desktop &gt; div:first-child</td>
<td>myip</td>
</tr>
<tr>
<td>echo</td>
<td>${myip}</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