File size: 1,576 Bytes
6a7089a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>E2E Test - Form</title>
</head>
<body>
  <h1>Form Test</h1>
  <form id="test-form" action="/submit" method="POST">
    <div>
      <label for="username">Username:</label>
      <input type="text" id="username" name="username" placeholder="Enter username">
    </div>
    <div>
      <label for="email">Email:</label>
      <input type="email" id="email" name="email" placeholder="Enter email">
    </div>
    <div>
      <label for="password">Password:</label>
      <input type="password" id="password" name="password">
    </div>
    <div>
      <label for="country">Country:</label>
      <select id="country" name="country">
        <option value="">Select country</option>
        <option value="us">United States</option>
        <option value="uk">United Kingdom</option>
        <option value="de">Germany</option>
        <option value="it">Italy</option>
      </select>
    </div>
    <div>
      <label>
        <input type="checkbox" id="terms" name="terms">
        I agree to the terms
      </label>
    </div>
    <div>
      <button type="submit" id="submit-btn">Submit</button>
      <button type="reset" id="reset-btn">Reset</button>
    </div>
  </form>
  <div id="result"></div>
  <script>
    document.getElementById('test-form').addEventListener('submit', function(e) {
      e.preventDefault();
      document.getElementById('result').textContent = 'Form submitted!';
    });
  </script>
</body>
</html>