AnsweredAssumed Answered

Selenium test to create users.

Question asked by michaelc on Jul 22, 2010
Trying to setup a selenium test and I am having some issue.
This is in the create user process.
it's working very well until I get to the click on the create user button.
the button is disabled, the fields are valid.
If I stop the script and touch the user field it will then work.

the javascript is not seeing the field value is set.
I can see notes that your using selenium for your testing so I would expect you have seen this and know what might be required.

This is just initial code that I convert to java later and automate, but for now I just want it to work so I know what is required.

<?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://localhost:8080/share/" />
<title>New Test</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>open</td>
   <td>/share/page/site-index</td>
   <td></td>
</tr>
<tr>
   <td>type</td>
   <td>username</td>
   <td>admin</td>
</tr>
<tr>
   <td>type</td>
   <td>password</td>
   <td>admin</td>
</tr>
<tr>
   <td>clickAndWait</td>
   <td>btn-login</td>
   <td></td>
</tr>
<tr>
   <td>clickAndWait</td>
   <td>link=Admin Console</td>
   <td></td>
</tr>
<tr>
   <td>clickAndWait</td>
   <td>link=Users</td>
   <td></td>
</tr>
<tr>
   <td>click</td>
   <td>page_x002e_tool_x002e_admin-console-newuser-button-button</td>
   <td></td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-firstname</td>
   <td>Michael</td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-lastname</td>
   <td>Ford</td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-email</td>
   <td>michael.c.ford@x.org</td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-username</td>
   <td>a447738</td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-password</td>
   <td>cesra447738</td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-verifypassword</td>
   <td>cesra447738</td>
</tr>
<tr>
   <td>focus</td>
   <td>page_x002e_tool_x002e_admin-console-create-username</td>
   <td></td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-username</td>
   <td>a447738</td>
</tr>
<tr>
   <td>clickAndWait</td>
   <td>page_x002e_tool_x002e_admin-console-createuser-ok-button-button</td>
   <td></td>
</tr>
<tr>
   <td>clickAndWait</td>
   <td>page_x002e_tool_x002e_admin-console-newuser-button-button</td>
   <td></td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-firstname</td>
   <td>Dan</td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-lastname</td>
   <td>NG</td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-email</td>
   <td>ssd@x.org</td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-username</td>
   <td>a447799</td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-password</td>
   <td>cesra447799</td>
</tr>
<tr>
   <td>type</td>
   <td>page_x002e_tool_x002e_admin-console-create-verifypassword</td>
   <td>cesra447799</td>
</tr>
<tr>
   <td>click</td>
   <td>page_x002e_tool_x002e_admin-console-createuser-ok-button-button</td>
   <td></td>
</tr>
</tbody></table>
</body>
</html>

Outcomes