-
Notifications
You must be signed in to change notification settings - Fork 0
/
checkboxradio.html
115 lines (86 loc) · 4.34 KB
/
checkboxradio.html
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LearnAutomatedTestingDemoPage</title>
</head>
<body>
<div id="navigation"></div>
<!-- Main jumbotron for a primary marketing message or call to action -->
<div class="jumbotron">
<div class="container">
<h4 class="display-3 text-center">Test checkBox</h4>
</div>
</div>
<div class="form-check text-center">
<input class="form-check-input" type="checkbox" value="" id="defaultCheck1" onclick="Checkedornot();">
<label class="form-check-label" for="defaultCheck1">
Click on Enabled Checkbox
</label>
</div>
<div class="form-check text-center">
<input class="form-check-input" type="checkbox" value="" id="defaultCheck2" disabled>
<label class="form-check-label" for="defaultCheck2">
Disabled checkbox (you cannot click on disabled checkbox)
</label>
<blockquote class="blockquote text-center">
<div class="alert alert-success alert-dismissible fade show invisible">
<strong>Success!</strong> Your have succesfully clicked on the checkbox.
<button type="button" class="close" data-dismiss="alert"></button>
</div>
<p class="text-success" id="checkpar"></p>
</blockquote>
</div>
<div class="jumbotron">
<div class="container">
<h3 class="display-3 text-center">Test Radiobutton</h3>
</div>
</div>
<div class="form-check text-center">
<input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios1" value="option1" checked>
<label class="form-check-label" for="exampleRadios1">
Default radio
</label>
</div>
<div class="form-check text-center">
<input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios2" value="option2">
<label class="form-check-label" for="exampleRadios2">
Second default radio
</label>
</div>
<div class="form-check text-center disabled">
<input class="form-check-input" type="radio" name="exampleRadios" id="exampleRadios3" value="option3" disabled>
<label class="form-check-label" for="exampleRadios3">
Disabled radio
</label>
</div>
<blockquote class="blockquote text-center">
<p class="text-success invisible" id="checkpar">Click on Checked, you did well with the testautomation tooling</p>
</blockquote>
</div>
</main>
<footer class="container">
<p>© Company 2020</p>
</footer>
<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(function() {
$("#navigation").load("navigation.html");
});
</script>
<script> function Checkedornot() {
document.getElementById('checkpar').className = "text-success visible";
if($('[id$=defaultCheck1]').prop('checked') == true) {
$('[class$="alert alert-success alert-dismissible fade show invisible"]').attr("class","alert alert-success alert-dismissible fade show visible");
}else
{
$('[class$="alert alert-success alert-dismissible fade show visible"]').attr("class","alert alert-success alert-dismissible fade show invisible");
}
}
</script>
</body>
</html>