Skip to content

lssoliveira/demo-qa-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

End-to-End Web Form and API Validation

This script performs automated testing of a web form and API validation using JavaScript without framework.

How to Run

  1. Navigate to https://demoqa.com/text-box in your browser
  2. Open Developer Tools (F12 or right-click → Inspect)
  3. Go to the Console tab
  4. type: allow pasting
  5. Copy and paste the entire content of solution.js into the console
  6. Press Enter to execute
  7. Watch the console output for validation results

What the Script Does

  1. Form Automation: Fills form with test data using centralized configuration
  2. Form Submission: Submits form and waits for processing
  3. Output Validation: Extracts clean values after colons and validates exact matches
  4. API Testing: Validates JSONPlaceholder API response structure and individual keys
  5. Detailed Logging: Shows step-by-step validation results for each field
  6. Result Reporting: Prints "✅ All tests passed" if all validations succeed

About

Validating required fields with JavaScript

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published