Monday, 7 March 2011

Exercise 3.1- Create a Login Script

Aim:
Create a Login Script against the Wordpress.com Site using the IDE

Difficulty level:  Easy


What you will learn?
  • Record and playback 
  • usage of the IDE
  • script saving
Tips:


Pre-requisites:

Exercise Steps:
  1. navigate to the http://www.wordpress.com
  2. login using username: foundationselenium, password: password
  3. Click on the Login button

Conclusions

Related Entries




Solution:


HTML Solution 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="http://wordpress.com/" />
<title>LoginScript</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">LoginScript</td></tr>
</thead><tbody>
<tr>
 <td>open</td>
 <td>http://wordpress.com/</td>
 <td></td>
</tr>
<tr>
 <td>waitForElementPresent</td>
 <td>user_login</td>
 <td></td>
</tr>
<tr>
 <td>type</td>
 <td>user_login</td>
 <td>foundationselenium</td>
</tr>
<tr>
 <td>waitForElementPresent</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>
</tbody></table>
</body>
</html>



Helpful Video:


2 comments:

  1. I have also used syntax highlighter into the solution.

    ReplyDelete
  2. Exercise's Slide has been updated.

    ReplyDelete

Thank you for your comment
- Time2test Team