I would be glad if you prove me wrong but apparently Selenium IDE is fairly unreliable. For example, the last command in the following script does not have any effect inside the script but if I double click on it separately it opens the file selection dialog. Why?
Another question, how do I provide file selection with a next command?
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://ift.tt/mOIMeg">
<html xmlns="http://ift.tt/lH0Osb" xml:lang="en" lang="en">
<head profile="http://ift.tt/1goHyeI">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="selenium.base" href="http://ift.tt/1HZSYNR" />
<title>gumtree</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">gumtree</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>http://ift.tt/1SaEWPb;
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td>5000</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
<td>//form[@id='frmSyi']/div/div/div/div/nav/ul/li[2]/div/span[2]</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td>500</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
<td>//form[@id='frmSyi']/div/div/div/div/div/div/div/div/ul/li[10]/span</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td>500</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
<td>//form[@id='frmSyi']/div/div/div/div/div/div[2]/div/div/ul/li[2]/span</td>
<td></td>
</tr>
<tr>
<td>waitForPageToLoad</td>
<td>500</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
<td>//form[@id='frmSyi']/div/div/div/div/div/div[3]/div/div/ul/li[4]/span</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>500</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=continueButton</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>500</td>
<td></td>
</tr>
<tr>
<td>clickAt</td>
<td>link=Add image</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire