aboutsummaryrefslogtreecommitdiff
path: root/node_modules/selenium-webdriver/lib/test/data/hidden_partially.html
blob: f0f9fe5b8a6776cadaed73aabbe078232980f9c7 (plain)
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
<!DOCTYPE html>
<html>
  <head>
    <title></title>
    <script type="text/javascript">
      var next = 0;

      function addVisibleBox() {
        var box = document.createElement('DIV');
        box.id = 'box' + next++;
        box.className = 'redbox';
        box.style.width = '150px';
        box.style.height = '150px';
        box.style.backgroundColor = 'red';
        box.style.border = '1px solid black';
        box.style.margin = '5px';
        box.style.visibility = 'visible'

        window.setTimeout(function() {
          document.body.appendChild(box);
        }, 1000);
      }

      function addHiddenBox() {
        var box = document.createElement('DIV');
        box.id = 'box' + next++;
        box.className = 'redbox';
        box.style.width = '150px';
        box.style.height = '150px';
        box.style.backgroundColor = 'red';
        box.style.border = '1px solid black';
        box.style.margin = '5px';
        box.style.visibility = 'hidden';

        window.setTimeout(function() {
          document.body.appendChild(box);
        }, 1000);
      }
    </script>
  </head>
  <body>
    <input id="addVisible" type="button" value="Add a visible box!" onclick="addVisibleBox()"/>
    <input id="addHidden" type="button" value="Add a hidden box!" onclick="addHiddenBox();" />
  </body>
</html>