In this blog, we will be discussing about Test Cases to write and test for various Web Elements.
Test Cases covered for Web Elements include Header, Footer, Upload File/Image, Login, Login Page, Registration Page, Forget password, Button (UI+Functional), Radio button (UI+Functional), Checkbox (UI+Functional), URL, Phone Number (UI+Functional), Captcha (UI+Functional), Payment page, Download Report, Functionality, Design, Search, Error, OTP, Hyperlink, Dropdown, Tooltip, Email field, GUI, Delete Button. Let's get started!!!
Test Cases for Header:
1. Verify the header section added on the website. 2. Verify header section is aligned. 3. Verify icons aligned with the text if added to the header. 4. Verify icons added should be related to the link text. 5. Verify whether link text should be readable or not. 6. Verify the logo of the website added on the header is aligned or not. 7. Verify the same header used on whole website pages. 8. Verify header is sticky on the whole page or fixed as per requirements and design. 9. Verify whether all links should be opening on the header or not. 10. Verify on click on the link on the header the correct page should be open. 11. Verify the home page should be open on clicking on the logo on all pages. 12. Verify on the mouse hover color change or not for the link added on the header menu. 13. Verify that selected header links should remain ACTIVE to inform the user about the clicked screen/page. 14. Verify search bar is added to the header menu or not. 15. Verify header and body section should not look the same. The header and body section must distinguish. 17. Verify icon color should also change on mouse hover on the header if icons are added. 18. Verify dropdown options added on header shown on mouse hover or click.
Test Cases For Footer Section:
1. Verify the footer section is aligned at the end of the page. 2. Verify there should be no extra white space at the end of the footer on high screen resolutions. 3. Verify element is aligned at the footer section or not. 4. Verify footer section should be the same for all pages. 5. Verify the logo shown at the footer. 6. Verify logo is aligned on the footer. 7. Verify from any page on click on the logo home page should be open. 8. Verify by clicking on the links correct pages should be loaded. 9. Verify all social links with icons added on the footer. 10. Verify no spelling mistakes for the text on the footer section. 11. Verify there must be equal space for the elements links, button, and social links from top and bottom at the footer section. 12. Verify no broken link is found on the footer. 13. Verify whether the subscription to the newsletter section presents or not. 14. Verify whether the subscribe to the newsletter email field with subscribe button present or not. 15. Verify validation on the email field for subscribing to the newsletter added or not. 16. Verify an error message shown on blank input on click on the Subscribe button. 17. Verify confirmation message should be shown if the user subscribed successfully. 18. Verify mouse cursor changes from a pointer to a hand on the link. 19. Verify whether the copyright section is added to the footer or not. 20. Verify correct year was added to the footer section or not. 21. Verify whether the copyright icon is added or not on the footer section. 22. Verify the size of the copyright icon.
Test Cases for Upload File / Image:
1. Verify upload file button or link is present. 2. Verify the upload button or link should be clickable. 3. Verify that the whole button including the button text should be clickable. 4. Verify text upload on the button. 5. Verify icon added with the upload button is in the design and is aligned or not. 6. Verify on click on the Upload button window should be open to select the file. 7. Verify cancel button is working. On click on the cancel button window should be closed. 8. Verify that the user can be able to select and upload multiple files if required. 9. Verify users can upload multiple files at once. 10. Verify the order of the file should be the same as the files uploaded or both cases one by one and multiple files uploaded. 11. Verify that the user can only be able to upload the allowed files only. For example doc, Docx or pdf, or image files like jpg, png, etc. 12. Verify a proper error message should be shown in case the user tries to upload the file which is not allowed. File type not allowed. 13. Verify an error message should be shown in case the user tries to upload files more than the allowed limit. 14. Verify on uploading file loader should be shown. 15. Verify there should be some indication on the upload file. 16. Verify on upload a locked file password popup should be shown. 17. Verify file should be uploaded if the user adds the correct password for the locked file. 18. Verify a proper error message should be shown in case if password added for the protected or locked file is not correct. 19. Verify there should be an indication on file upload. 20. Verify that the file name should be the same and displayed after uploading the file. 21. Verify that the uploaded file extension should be shown with the file name. 22. Verify that the file size should be shown under the file name. 23. Verify an error message shown if the file size is large than the allowed one. 24. Verify an error message if the file is empty and has no content. 25. Verify the application behavior by uploading a large name file. 26. Verify … 3 dots should be shown in case the file name is too large and disturbs the design. 27. Verify upload functionality is working and functional by uploading a file. 28. Drag and drop functionality should work properly for the allowed file types. 29. Verify on the drop file, the file should not open on the browser. 30. Verify on drop file it should not download.
Test Cases for Login:
1. Verify the user credential remained on the field after clicking remember and get back to the login screen again. 2. Verify that the user will be able to log in with their account with the correct credential. 3. Verify that the user will get into their dashboard screen after login in with the correct credentials. 4. Verify that the user can access all controls and elements by pressing the Tab key from the keyboard. 5. Verify that the user can log in by entering valid credentials and pressing Enter key. 6. Verify that the user can log in by entering valid credentials and clicking on the login button. 7. Verify that the password entered should be in encrypted form. 8. Verify whether an eye icon is added to the password field or not. 9. Verify that the user can be able to view the password by clicking on the eye icon. 10. Verify line spacing added on password on mac. 11. There should be an email verification check, as the user verifies the email address then the user is able to view the dashboard and access features. 12. Add a captcha on the login form to prevent the robot attack. 13. Verify the error message should display after just entering an email address and leaving the password field blank. 14. Verify the error message should display after just entering a password and leaving the email field blank. 15. Verify the error message should display after entering the invalid credentials. 16. Verify the error message should display after entering an invalid email format. 17. Verify the displayed error message for invalid email format should be correct. 18. Verify the displayed error message grammar should be correct. 19. Verify the displayed error message spell should be correct. 20. Check logged in user should not log out on closing the browser. 21. Verify the login session timeout duration. So, once logged in a user can not be authenticated for a lifetime. 22. Verify logged-in user doesn’t log out by clicking the back button on the browsers tab. 23. Verify that there is a limit to the total number of unsuccessful login attempts. Therefore, users cannot use brute force mechanisms to try all possible username-password combinations. 24. Verify logged-in user copies the URL and pastes it into a new browser window, it should redirect to the login page. 25. Check login by google and all social options for login in the private window separately. 26. As the user signs in, on the home page, there is no need for displaying Sign Up or Try Now, etc (if the user logged in). 27. Add rate limit on login. After how many attempts user should be able to restrict by the app for the wait. 28. Verify it should not be always in loading in case the user adds an invalid email and password. 29. Verify all the functionalities should be working condition as the user sign-in from social login i.e Facebook and google. 30. Prevent login page from SQL injection attack.
Test Cases for Login Page:
1. Verify the login screen will appear after clicking on a login link or login button. 2. Verify all login-related elements and fields are present on the login page. 3. Verify the alignment of displayed elements on the login screen should be compatible in cross browsers testing. 4. Verify that the size, color, and UI of different elements should match the specifications. 5. Verify that the login page of the application is responsive and aligns properly on different screen resolutions and devices. 6. Verify login page title. 7. After the user login page is open, the cursor should remain in the username text box by default. 8. Verify that there is a checkbox with the label remember password on the login page. 9. Verify the remember me checkbox should mark as checked after clicking on the label text and the check box.
Test Cases for Registration Page:
1. Verify by clicking on the submit button for blank input. 2. Verify all fields related to registration present on the registration form. 3. Password field should have validation for a minimum of 8 to maximum of 16 characters, must conain one special character, at least one uppercase character, and have a numerical. 4. Verify password added by the user should be protected, encrypted, and shown in an asterisk(***). 5. Verify whether the validation is added for the password and confirm whether passwords are the same or not. 6. Verify an eye icon added to the password and confirm the password field. 7. Verify by clicking on the eye icon password should be shown for both passwords and confirm password fields. 8. Verify captcha is added to the form or not. Captcha added due to security. Hidden or visible may be added according to need. 9. Verify example or dummy data shown as placeholder text in the fields. It helps the user to register their account without facing any issues. 10. Verify that user-added information is not removed from the fields in case of any validation fails. Can be done when client-side validation is implemented. 11. Verify possible validation should be done on the client-side whenever possible. 12. Verify that validation is added to the email field, only valid emails should be allowed to register successfully. 13. Verify that the user adds blank spaces and clicks on the register button an error message should be shown. 14. Verify that the user can navigate or access the different controls by pressing the ‘Tab’ key on the keyboard. 15. Verify users can register successfully by entering valid credentials. 16. Verify that the user is not allowed to register an account with the same registered email by adding plus for example firstname.lastname@example.org. 17. Test by trying to register with an already registered email address. 18. Verify the email verification link was sent to the user's email address successfully. 19. Verify that the user should not be able to access the application, software, or pro features until the user verifies its email by clicking on the link sent in the email. 20. Verify the user is informed to check the spam folder if no email link is found in the inbox. 21. Verify Resend Link option is present if the user did not receive the link in the email. 22. Verify resend email link becomes disabled if the user continuously clicks on the Resend Link. Set a limit max of five times to send the link then give the user a rest. 23. If the user signup with email and social platform and both have the same email, consider it one email uniquely not the two separate accounts. 24. Verify that the required fields are not filled in and clicking the Register button will result in a validation error message. 25. Verify all spelling mistakes on the Register page.
Test Cases for Forgot Password:
1. Verify that forget password link should be present on the login screen. 2. Verify that on clicking on the forget password link forget password page should open. 3. Verify that the email field is present on the forget password page to recover the password. 4. Verify as the user update password, the user should log out from all browser and devices. 5. Verify that storage for the database on forgot password. 6. Verify that an email validation is added to the email field. 7. Verify Submit button should be present on the page. 8. Verify the whole button should be clickable not only the button text. 9. Verify that the link sent to the user should expire after a certain time. 10. Verify sent password link should be disabled on clicking multiple times on the link or as per specification and requirement. 11. Verify the error message should be displayed after entering an unregistered user email id. 12. Verify the displayed error message for unregistered should be meaningful. 13. Verify the confirmation message check your email to recover the password should be displayed after clicking on the button by entering the registered email id. 14. Verify that the user will get an email after entering a valid email id in forget password. 15. Verify the email which the user gets against forgot password should be displayed in the inbox, not in the spam folder. 16. Verify the error message should be displayed when clicking on the recover button without entering the email id. 17. Verify the user will get the forget password email from email@example.com. 18. Verify the heading displayed in forget password screen should be ” Forget Password “. 19. Verify the error message should be displayed when entering spaces in the field and clicking on the Submit button. 20. Verify the subject name displayed in forget password email should be ” Your New Password”. 21. Verify user should be login successfully with the new password not by the old password. 22. Verify message should be shown on profile change your password in case if a temporary password is sent in the email.
Test Cases for Button (UI + Functional):
1. Verify button present on the page as per the design on the web page.
2. Verify the button colour same as per design.
3. Verify icon added on the button if added in the design. For example Upload or download icon with the button.
4. Verify icon added on the button must be aligned with button and button text or not.
5. Verify width and height for the button.
6. Verify border radius is applied on the button or not.
7. Verify that the width and height of the buttons used on the website are the same or not as per design.
8. Verify button text related to the functionality of the tool on the web page.
9. Verify button is enabled/clickable or not by clicking on the button.
10. Verify colour changed on the mouse hover or not.
11. Verify colour changed on mouse hover the same as per design.
12. Verify user can be able to open button link in a new tab by right click on the button, Open link new tab option shown or not.
13. Verify whether pressing the Ctrl button on the keyboard and click on the button opens a new tab or not. It should be according to the requirements.
14. Verify the whole button should be clickable not only the button text.
15. Verify values added by the user on click on the submit button saved correctly in the database.
16. Verify the user should not be allowed to click on the submit form/page button multiple times intentionally or unintentionally.
17. Verify the desired action performed on click on the button or not.
18. Verify the spelling for the button text is correct or not.
19. Check button text is readable or not by verifying button text size.
20. Verify button text colour should be visible on the button.
21. Verify font family provided by the designer implement or not.
22. Verify the reset button should set default values for all fields.
Test Cases for Radio Button (UI + Functional):
1. Verify radio buttons present on the page as per design.
2. Verify the size of the radio button should be the same as per design.
3. Verify style and color for the radio buttons should be the same as per requirements or not.
4. Verify label text present on the page with the radio buttons.
5. Verify the label text for the radio button added in the same sequence as per specification.
6. Verify spellings for the label text with the radio buttons are correct or not.
7. Verify if the label text aligned with the radio buttons or not.
8. Verify if the radio button is selectable and unselectable or not by clicking all radio buttons.
9. Verify on clicking on the label text, whether the radio button value is selected or not.
10. Verify only one value from the radio buttons can be selected or not.
11. Verify user can choose any option from the radio buttons by pressing the tab key on the keyboard.
12. Verify whether an error message is shown or not in case the user not select any value and click on the submit button
13. Verify selected radio button value is saved in the database correctly or not.
Test Cases for Checkbox (UI + Functional):
1. Verify that the checkbox present on the webpage is in the correct position.
2. Verify the width and height of the checkbox.
3. Verify the border-radius for the checkbox rounded or corner edge.
4. Verify the color for the tick by clicking the checkbox.
5. Verify the checkbox is selectable by clicking on the checkbox with the mouse.
6. Verify the checkbox is selectable by the keyboard.
7. Verify the user can uncheck the checkbox by clicking on it.
8. Verify if the user can select multiple checkboxes or not.
9. Verify the label text present with the checkbox.
10. Verify if the label text aligned with the checkbox or not.
11. Verify on page load the very first checkbox selected by default and showing tick sign.
12. Verify whether on click on the label text checkbox value checked or not.
13. Verify the spelling for the label text aligned with the checkbox.
14. Verify same label text is not repeated with the checkboxes.
15. Verify the order for the values or label text with the checkboxes.
16. Verify whether user-selected checkbox values should save in the database by clicking on the Submit button or not.
17. Verify check box can be uncheckable or not by clicking on the check box after selecting.
18. Verify validation is added if no checkbox is checked and click on the Submit button and an alert or error message must appear.
Test Cases for URL:
1. Verify by clicking in the input URL field that the user can access the field.
2. Verify user can type URL in the field.
3. Verify user can paste URL with the keyboard key URL in the field.
4. Check by pasting the URL in the field with the help of mouse. i-e right click and paste the text with paste option.
5. Paste URL and press enter key on the keyboard result generation process should be started.
6. Check by adding a valid URL with https://. e.g https://mohantyacademy.blogspot.com/
7. Check by adding a valid URL with http://.
8. Verify by adding all the extensions or TLD’s. .in, .be, .xyz, site etc.
9. Check by adding spaces at the start of the button, spaces should not be considered.
10. Check by adding spaces at the end of the URL spaces should be trimmed.
11. Check by adding only the domain name without https://
12. Check by without entering the URL in the field and click on the button. A proper error message should be shown. No URL found!
13. Verify by adding an IP address of the website and click on the button.
14. Check by adding a valid URL without extension.
15. Check by adding only the name of the site without adding . dot in the URL field.
16. Check by adding only the extension. https://www.com
17. Check by adding the URLs of the maximum length. e.g https://www.numpyninja.com/test-cases-for-forgot-password/
18. Check by adding the URLs of the minimum length. e.g. https://www.numpyninja.com/
19. Verify the behavior of the application by entering an encoded URL.
20. Verify a URL containing Parameters.
21. Verify by adding and removing forward slashes /.
22. Verify a URL containing any special characters. e.g. #
23. Verify an anchor text URL.
24. Verify on click on the button, an error message shown for blank input or not.
25. Verify on click on the button, an error message shown for adding spaces in the URL field or not.
Test Cases for Phone Number (UI + Functional):
1. Verify that the mobile number field should display the accepted format of the mobile number as the placeholder text for user assistance.
2. Add a valid mobile number and verify the field should accept the correct mobile number.
3. Verify user can copy and paste the mobile number in the field or not.
4. Verify mobile number field should accept only the numeric value by entering alphabets.
5. Verify mobile number field should accept only the numeric value by entering the special character.
6. Verify by entering the less number than the actual mobile number.
7. Verify the behaviour by adding more digits than the actual mobile number.
8. Verify field accepts the space (s) between the mobile number or not according to the requirements.
9. Verify an error message shown for the blank input for the Mobile Number Field.
10. Verify by adding only the spaces in the Mobile Number Field.
11. Verify correct mobile number is saved in the database or not by click on the Save or Next button.
12. Verify mobile number is saved by pressing the enter button after adding the mobile number in the field.
13. Verify country flags are shown with the Mobile Number field or not.
14. Verify with Flags country code is shown or not with the Mobile Number field.
Test Cases for CAPTCHA (UI + Functional):
Captcha is used to prevent any attack. Captcha is used on the form submission. Register, login, forgot password and support page.
Below are the Test Cases for CAPTCHA:
1. Verify the time duration in which the captcha is loaded on the webpage.
2. Test captcha should not be by passed by clicking on the captcha multiple time when the captcha is not loaded and shown on the webpage during web page loading.
3. Check the time out for the Captcha. The time in which the captcha become unchecked.
4. Test the captcha on slow internet. An invalid captcha error message should not be shown.
5. Verify the captcha and click on the submit button two times. It should not display an invalid captcha error.
6. Verify every time a new captcha should be shown on page reload.
7. Verify user IP is blocked on attempting an invalid captcha after the defined number of attempts.
8. Verify captcha is placed on the required web page.
9. verify captcha added is aligned or not.
10. Verify captcha is shown on ad blockers or not.
11. Verify captcha working on adblocker or not.
12. verify webpage accepts the valid captcha or not.
13. Verify that the user can request for new captcha without the page loading option is present or not.
14. Verify an audio option is added for the captcha or not as per the requirements.
15. Verify new captcha is generated in case if the user adds the wrong captcha.
16. Verify an error message shown when page timeout for the captcha.
17. Verify an error message should be shown in case if the captcha is not filled by the user.
18. Verify a proper error message is shown in case if the user not fills the captcha correctly.
19. Verify an error message is shown in case if the captcha is partly filled by the user.
Types of Captcha: Test case related to Image Captcha, Test case related to Digit/Code Captcha.
Test Cases related to Image Captcha:
1. Verify image in the tile is shown on click on the check box or not.
2. Verify the images are clearly visible to the user or not.
3. Verify tile images shown on captcha are clickable or not.
4. Verify that the captcha is loaded properly on the web page load.
Test Cases related to Digit / Code Captcha:
1. Verify captcha code is clearly visible or not.
2. Verify code shown should be in image form or not.
3. Verify user can not copy and paste the captcha verification code from the image.
4. Verify captcha code is clearly visible to the user.
5. Verify captcha should display code clearly between zero 0 and O o, 5 and S.
6. Verify captcha code should be case sensitive (Upper and Lower case).
Test Cases for Payment Page:
1. Verify services and features mentioned on the pricing page clearly.
2. Verify spellings for the content on the pricing page are correct or not.
3. Verify the trial period in time in days or queries functional properly if provided.
4. Verify that the trial expires service should not be accessible until the user purchases the plan.
5. Verify user data should be saved as the user purchase plan after the completion of the trial period.
6. Do not allow the user to purchase a plan without email verification.
7. Verify as the user purchase the plan, the user plan status should be updated to paid without forcing the user to log out and then log in.
8. Verify if the user can buy the plan successfully after email verification or not.
9. Verify invoice generated on the purchase of a plan is accessible to the user or not. Sent in email or shown on Dashboard.
10. Verify user can download an invoice or not.
11. Verify whether an invoice is sent on the registered email to the user on the purchasing plan or not.
12. Verify the user login with social links can purchase a plan.
13. Verify the plan assigned to the user is the same selected by the user.
14. Verifies plan queries or offered services shown on the user profile.
15. Verifies whether the plan's remaining queries are shown on the user profile or not.
16. Verify the expiry date for the purchased plan is shown on the profile or not.
17. Verify whether plan expiration notification should be shown on the dashboard/profile or not. Email may also be sent to the user.
18. Verify whether the renew plan link is added to the Dashboard or not.
19. Verify on click on the renew link should redirect to the plan and pricing page.
20. Verify the user is unable to enjoy services once the plan expires and the user does not renew the plan.
21. Verify user can downgrade its plan or not during the plan activation.
22. Verify user can downgrade its plan or not after the plan expires and the user renews its plan.
23. Verify test case user can upgrade or purchase plan during the purchased plan is active and the user allowed queries end.
24. Verify the case if the user can purchase a new plan, it will add queries in the already purchased plan or not as per requirement.
25. Verify plan expiry date increased or not if the days and queries are remaining and the user upgrades its plan.
26. Verify whether auto-renewal is working or not.
27. Verify auto-renewal is mentioned clearly on the pricing page.
28. Verify user can cancel its plan at any time.
29. Verify user can purchase the plan successfully after the user cancels its plan.
30. Verify if the user cancels its plan, don’t access the user pro feature until its plan expires.
Test Cases for Download Report:
1. Verify the document page number added on the pdf report.
2. Verify the website logo should be present in the report.
3. Verify report name should be written on the report.
4. Verify there should be no blank page from the start to the end of the report.
5. Verify there should be no difference between the results on the report and the result section.
6. Verify empty report, without any content, should not download.
7. Verify report should be downloaded on click on the download PDF report button.
8. Verify report name should be related to the tool name.
9. Verify download report name should be the same as the user uploaded file name as per requirement.
10. Verify if the user clicks on the Download excel report, the excel report should be downloaded. Same for .doc, .pdf and .txt.
11. Verify content format should not be disturbed on the report.
12. Verify content at the end of the page in the PDF report should not be cut off.
13. Verify link added to the report should be clickable.
14. Verify clicking on the link on the PDF report should open a new tab.
15. Verify information on the report should be concise and clear.
16. Verify charts the color should not disturb the PDF report.
17. Verify and compare the printed report with the result and e report.
18. Verify the readability of the report.
19. Verify generated report steps and sequence should be the same or similar to the result.
20. Verify share report by URL should open successfully in the new browser.
21. Verify links added to the report should be distinct. The blue color can use on links.
22. Verify the position of the elements, logos, and pictures on resumes and CVs should not be disturbed by even a single pixel.
23. Verify special char. should be handled on the pdf report.
24. Verify results generated in different languages should be shown properly on the downloaded pdf report. e.g Hindi
25. Verify only a single report should download successfully.
Test Cases for Functionality:
1. Verify that the text area is functional in case of any validation error message shown.
2. Verify if keyboard shortcut keys enable in the text area. Users can copy, cut or paste and select content on shift + Arrow Keys.
3. Verify Backspace, delete keys should be functional.
4. Verify user can type in the text area after clicking in the text area.
5. Verify user can paste the copied content with keyboard keys Ctrl + v.
6. Verify on click on the copy to clipboard, copied the same content with the same format from the result section in the text area.
7. Verify that Html code not be implemented in the text area or the result section on click on the Submit button.
8. Verify the input text area is protected from the SQL injection.
9. Verify the format should be the same as the copied content and paste on the other or same text area.
10. Verify if the user copy/pastes highlighted content, then don’t display the copied content highlighted.
11. Verify user can paste the content with the help of a mouse, by right-clicking and selecting the paste option in the text area.
12. Verify content uplpaded by dragging and dropping a file in the text area.
13. Verify user can upload the file to the text area successfully.
14. Verify word count update on paste content in the textarea.
15. Verify users can add alphabetic or alphanumeric and special characters.
16. Verify users can add content on both cases lower and upper.
17. Verify the maximum content limit applied.
18. Verify the minimum content limit applied.
19. Verify an error message appears if the user adds spaces and clicks on the button.
20. Verify text area become enabled after getting the result or as per requirement.
Test Cases for Design:
1. Verify the width and height of the text area.
2. Verify by moving the mouse cursor to all input text boxes. The cursor should change from an arrow to an insertion bar.
3. Verify whether horizontal and vertical scroll bar is added or not according to requirement.
4. Verify if the functionality for the horizontal and vertical scroll bar working properly by pasting content.
5. Verify placeholder text aligned & Visible in the text area.
6. Verify the clear text icon is aligned with the text area.
7. Verify place holder text should be clear and the cursor shown on click.
8. Verify placeholder text is meaningful and informative for the user.
9. Verify the spellings and grammar for the placeholder text.
10. Verify the text area should be locked and fixed. Don’t let the user resize the text area.
11. Verify if the user can add and process duplicate content.
12. Verify tooltip added and shown if required.
13. Verify mouse hover functionality if added.
14. Verify the clear text icon present in the text area.
Test Cases for Search Functionality:
1. Verify the search field is present and aligned.
2. Verify whether placeholder text is added on search or not.
3. Verify spelling and grammar should be correct for placeholder text.
4. Verify search icon is present on the field.
5. Verify cursor should pe present on click on the search icon.
6. Verify search is functional and generating the correct result for correct keywords or not by adding a valid search.
7. Verify if the user can paste the keyword with the mouse.
8. Verify the search is working by adding keywords and pressing the Enter key on the keyboard.
9. Verify the search is working by adding keywords and on click on the search button.
10. Verify an error message displayed by entering invalid keywords in the search field and clicking the search button.
11. Verify an error message should display for blank input.
12. Verify and observe how much time is required for getting the search result.
13. Verify a loader added if takes time to get the result.
14. Verify the search result generated by the search in the correct order as per requirement.
15. Verify pagination added in case the search result goes on the number of pages.
16. Verify whether pagination is accessible or not by clicking on the Next, Previous, and number.
17. Verify whether suggestions are shown or not on adding a keyword to the search.
18. Verify the max and min range for the search keyword.
19. Verify whether auto-suggestion is shown on adding a keyword or not.
20. Verify if new items/tools are added to the website, a keyword should also be for the website search. So, the user can access them.
21. Verify whether related keywords are added to the search result or not. It should be added.
Test Cases for Testing the Error Message:
1. Check spelling for the error message is correct or not.
2. Verify that the grammar for the error messages is correct.
3. Verify the error message for blank input is shown.
4. Verify an error message for uploading an empty file is shown or not.
5. Check an error message should be shown for the maximum or upper limit.
6. Verify if the error message shown for the files is not supportable by the tool.
7. Verify confirmation message on email registration.
8. As an error message is shown for blank input or limit after it the user should be able to click and interact with the software.
9. Verify an error message should be shown in case if the user adds minimum words or content than the allowed limit.
10. Check the error message should be shown for the invalid URL.
11. A proper error message should be shown for an invalid captcha.
12. verify error message position should be aligned.
13. Verify and check a proper error message should be shown if the captcha is not loaded.
14. Verify and check that the same format should be used for displaying all the error messages. It may include uppercase, lower case, or sentence case.
15. 500 error message page should be shown to the user.
16. The red color is used for displaying the error message to the user.
17. For info and confirmation blue or green used.
Characteristics for good error messages majorly include:
1. An error message should be concise, understandable, and well explained to the user.
2. An error message should clearly display the instructions and should not be ambiguous.
3. Error messages should be written gracefully and not blame the user.
4. Error messages vary from field to field. These should be properly aligned specifically for the field on which an error message is encountered.
5. Describe the user's clear directions. Users should not feel blocked and jammed.
Test Cases for OTP Code Verification:
1. Verify for verification whether valid and correct OTP is generated or not.
2. Verify OTP code should be valid only for one time or not.
3. Verify the count for the OTP code generated should not be more than required.
4. Test the count for the OTP code generated should not be less than required.
5. Verify OTP code is sent to the user successfully or not within time or not.
6. Verify and confirm the time duration in which the user received the OTP generated code sent by email.
7. Check the time duration for the OTP-generated code received by the user on mobile.
8. Verify OTP code fetched by the application from the message by default or user add manually. It depends on the requirements.
9. Verify by adding the valid OTP application must accept the code successfully.
10. Confirm whether the correct info message is shown or not in case if the User adds a valid OTP code.
11. Verify a proper error message should be shown in case if the user adds an invalid OTP code.
12. Verify OTP code should expire after the time allowed by the application or software.
13. Verify application should not accept the OTP code once expired.
14. Verify the user can request a new OTP code by clicking on the link or button resend code.
15. Verify on again request on clicking on the Resend link OTP code should be sent to the user successfully or not.
16. Verify whether the user should be temporarily blocked or not in case if it requests for new OTP code again and again.
17. Verify whether the limit is set for OTP code to resend multiple times or not. (For example, a maximum of five attempts is allowed per user)
18. Verify OTP code is case sensitive or Not.
19. Verify OTP code is only numeric or alphanumeric.
Test Cases for Links:
1. Check whether the link added on the page is clickable or not by clicking on the link.
2. Verify whether the text is added to the link or not.
3. Verify correct URL/link address should be added to the text or not.
4. Verify on clicking on the link redirects to the correct URL or not.
5. Verify that the link added with the correct hypertext transfer protocol https:// or http://.
6. Make sure the link opens in the same tab or a new tab by clicking on the link.
7. Verify link should be added to the required text or not.
8. Verify the on-link text color should not be the same as the content and changes on mouse hover.
9. Verify the text on a link should be relevant or not.
10. Verify there should not be any spelling mistakes on the link text.
11. Verify mouse pointer changes to hand on mouse hover on the link or not.
12. Verify tooltip is added on the link on mouse hover or not.
13. Verify tooltip should be aligned with the link or not.
14. Verify the text added on the tooltip.
15. Check on mouse hover to the link, the link address should be shown on the lower-left corner of the web page or not.
16. Check whether the loader is shown on click on the link or not.
17. Verify the whole image is clickable if the link is added to the image and on the click, it redirects to the desired page.
18. Verify image should not be broken in case if the link is added to the image.
19. Verify the web page slides at the correct position if links are added on the same page.
Test Cases for Dropdown:
1. Verify whether all values are added to the dropdown list or not.
2. Verify that the label text for the dropdown should be as per requirements and aligned or not.
3. Verify on click on the dropdown it should display a list containing values.
4. Verify that the dropdown displays all values or not as the user clicks on the dropdown.
5. Verify whether scroll-down functionality working in the dropdown list or not.
6. Verify that the drop-down list should be scrolled down by pressing the down arrow key on the keyboard.
7. Verify that the by default selected value is shown on the dropdown or not.
8. Verify that the dropdown should not be editable.
9. Check the order of the values in the dropdown list same as the requirement or not.
10. Check that there should not be any blank value shown in the dropdown list.
11. Verify whether dropdown values are case sensitive or not as a system required.
12. Verify that the dropdown values should be accessible and selected by clicking on the alphabet from the keyboard.
13. Test dropdown list design should not be disturbed on all browsers.
14. Check the spelling for the values in the dropdown list.
15. Verify all the values in the Dropdown align or not.
16. Verify whether on mouse hover mouse pointer change from a pointer to hand or not.
17. Verify whether proper spacing is added on the dropdown values or not.
18. Verify mouse hover effect is added to the dropdown list or not.
19. Check the text length for the maximum char or words are shown or not in the dropdown.
20. Verify that the user can choose any value from the dropdown by clicking on the tab button on the keyboard.
If Search is added in the Dropdown:
1. Verify search field should be clickable or not by clicking on the search field.
2. Verify that the text is added in the search field or not from keyboard typing.
3. Verify user can be able to paste the text in the search field by mouse.
4. Verify that the value from the list should be selected if the user adds a valid keyword.
5. Verify a proper error message should be shown in case if the user adds an invalid keyword.
Test Cases for Tooltip:
1. Verify tooltip width and height should be aligned or not.
2. Make sure that the text shown on the tooltip is aligned or not.
3. Verify whether the accurate text shown on the mouse hovers on the tooltip or not.
4. Verify as the user move pointer from the icon or link tooltip text should be hidden or not.
5. Verify on the mouse hover color on the icon changed or not.
6. Verify on the mouse hover, that the mouse pointer changes or not.
7. Verify icon is aligned with the label text on which the tooltip is implemented.
8. Verify text for the maximum length on the tooltip should not be trim.
9. Verify that the tooltip text should be relevant and well explained to the user.
10. Verify there should not be any spelling mistakes for the content added on the tooltip.
Test Cases for Email Field:
Design Related Test Cases:
1. Verify email field is present on the page.
2. Verify whether label text is shown with the email field or not.
3. Verify label text email align with the email field.
4. Verify that the placeholder text in the email field is added or not.
Functional Test Cases:
1. Verify email address field is accessible by clicking on the email field.
2. Check users can type email in the email field.
3. Verify user can paste the email address in the field by keyboard keys Ctrl + v.
4. Verify that the user can paste the email address with the mouse by right-clicking in the email field and pasting the email address.
5. Verify validation for the email field is implemented or not.
6. Verify whether an error message should be shown in case if the user adds an invalid email address or not.
Positive Test Cases:
1. Validate the email field by entering a valid email address. (firstname.lastname@example.org)
2. Verify the email must contain @ in the email address.
3. Verify that an email field accepts an email containing a plus + sign in the Email address.
4. Verify whether an email field validates an email address containing a domain or not. (email@example.com)
5. Make sure there should dot present in the email address or not.
6. Verify an email address should be considered correct if an email contains a subdomain.
7. Check that an email address has a maximum of 2 dots in the case of the subdomain.
8. Verify an email address containing a special character consider valid.
9. Verify an email address having numbers is valid.
10. An email address with quotes ” ” should consider valid.
11. An email address may contain a dash – or underscore _.
Test Cases for GUI:
1. Verify that all the elements (checkboxes, radio button, text fields etc.) on the webpage are aligned or not.
2. Make sure that icons on the webpage align with the web page.
3. Verify that placeholder text on the input field is present and visible or not.
4. Verify the layout for the webpage on cross-device testing.
5. Test responsiveness for all the elements label text, field, checkboxes or radio buttons on different browsers while testing cross-browser testing.
6. Verify whether the font size for the content on the webpage is readable or not.
7. Confirm the font colour for the content on the web page or not.
8. Verify the placement and position of the error message shown on the webpage according to design.
9. Verify the colour for the error messages, warnings and info messages.
10. Verify proper padding and spacing between different elements on the web page. (label text and check box, buttons devs etc.)
11. Verify image should not be blurred and visible on the webpage.
12. Check banners or images should be shown and aligned on mobile devices. And should not be trimmed.
13. Verify the text on the images should be readable.
14. Verify the spellings should be correct on the web page.
15. Check the colours for the links added to the text.
16. Verify the correct page should be open on click on the link.
17. Verify the headings on the content.
18. Verify whether the validation is on the fields added or not.
19. A confirmation message is shown on the popup or alert in case of delete functionality on the web page or not.
20. Verify titles on all web pages.
21. Verify there should not be any broken links present on the web page.
22. Make sure there should not be any broken images should not be shown on the web page.
23. Verify the order of the values on the dropdown list should be sorted as required.
24. Verify 404 page is designed or not.
Test Cases for Delete Button:
1. Verify Delete button is present on the page or not.
2. Check delete/trash icon with Button text is shown or not.
3. Verify whether the whole button should be clickable or not.
4. Verify a confirmation message on the popup or alert shown as the user clicks on the delete button.
5. Make sure the record or report should not be deleted as the user clicks on the NO on the confirmation popup.
6. Make sure that the delete functionality works as the user clicks on the YES button on the confirmation popup.
7. Verify record should be deleted successfully from the database as the user clicks on the Yes button on the confirmation popup.
8. Verify the system offering the user to recover the deleted record by clicking on the Undo that will be shown as the user deletes the record.
9. As the user clicks on the Undo button record or deleted file should be restored to the same position or location.
10. Check whether the user can delete the record by clicking on the delete button present on the keyboard or not.
11. Check as the user delete the record successfully it should not be shown again in the table.
12. Verify as the user deletes the report it should be redirected to the correct required screen or not.
13. Verify whether the user can delete multiple files at once or not.
14. Check for multiple delete actions the user can select the records by selecting the checkboxes.
15. Verify an error message should be shown if the user clicks on the Delete button without selecting the file.
16. Verify only the user-selected file(s) should be deleted and not affect any other record.
Having Test Cases for similar type of elements in Web Site Testing, can be very handy and reduce lot of work related and enhance reusable Test Scripts. In this blog, we have discussed various Test Cases for Web Elements and how to perform Web Site Testing.