Simple test in Robot Framework which uses Selenium2Library. It tests registration form on yahoo.com.
Test case: Trying to register a new account with invalid user name.
Enviroment: OS - Ubuntu 17.10 (64-bit), browser - Firefox Quantum 59.0.2 (64-bit)
Preconditions: Browser open on page "https://www.yahoo.com". No user signed in.
Steps:
- Open https://www.yahoo.com (1a. On temporary page about RODO click "Agree") 1b. On main page yahoo.com click "Sign in".
- Click "Sign up".
- In the "First name" field put valid name e.g. Joanna.
- In the "Last name" field put valid last name e.g. Pasek.
- In the "Email address" field put an user name including some unallowable characters e.g. joanna$$$.
- In the "Password" field put valid password.
- From drop-down list of country codes choose a code e.g. Poland (+48).
- In the "Moblie phone number" field put valid phone number e.g. 789789789.
- From the "Birth Month" drop-down list choose some month.
- In the "Day" field put valid month's day.
- In the "Year" field put valid year.
- From the "Gender" drop-down list choose gender e.g. Female.
- Click "Continue".
Expecting results: Registration fail. Under the "Email Address" field appears following statement: "You can only use letters, numbers, periods (‘.’), and underscores (‘_’) in your username."