Create a user registration script against the Wordpress.com site.
Difficulty Level: Easy/Medium
What you will learn?
- Record and playback
- usage of the IDE
- Javascript functions
- random variables
- debugging
- Use a JavaScript function to generate the random variable
- Record the script initially without using javascript and ensure that the script works before adding the random variables.
- Firefox browser with Selenium IDE installed ,use link How to install Selenium IDE?
Exercise Steps
- navigate to the http://www.wordpress.com
- login using username: foundationselenium, password: password
- Click on the Login button
- Click on Users
- Click on Invite link
- Enter the User details ( use a javascript function)
- Click on Send Invite button
Conclusions
Related Entries
Here is the script in HTML texts:
--------------------------------------------
<?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://wordpress.com/" />
<title>UserRegistration</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">UserRegistration</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>http://wordpress.com/</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>user_login</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>user_login</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>user_login</td>
<td>foundationselenium</td>
</tr>
<tr>
<td>click</td>
<td>user_pass</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>user_pass</td>
<td>password</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>login-form</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>css=#wp-admin-bar-blog-1-d > a</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Users</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Invites</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>fname</td>
<td>testfirst</td>
</tr>
<tr>
<td>type</td>
<td>lname</td>
<td>testlast</td>
</tr>
<tr>
<td>type</td>
<td>email</td>
<td>javascript{"Test" + new Date().getMilliseconds()+"@gmail.com";}</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>Submit</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
Helpful Video:
I have used Syntax highlighter as well in solution.
ReplyDelete