页面测试
Posted carlpeng
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了页面测试相关的知识,希望对你有一定的参考价值。
@{ Layout = null; } <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Login</title> <link href="~/css/fonts/Login.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="login"> <h1>Login</h1> <form > <input type="text" required="required" placeholder="用户名" id="username" /> <input type="password" required="required" placeholder="密码" id="password" /> <button class="but" type="submit" onclick="login()">登录</button> </form> </div> </body> </html> <script src="~/lib/jquery/jquery.min.js"></script> <script src="~/js/jquery.md5.js"></script> <script type="text/javascript"> function login() { var username = $("#username").val(); var password = $("#password").val(); if (username == "" || password=="") { return; } var md5password = $.md5(password); $.ajax({ url: "/BackStateManagement/Verification?userName=" + username + "&passWord=" + md5password + "", type: "Get", /*设置表单以post方法提交*/ // dataType: "json", /*设置返回值类型为文本*/ success: function (res) { alert("123"); }, error: function (res) { alert("321"); } }); } </script>
以上是关于页面测试的主要内容,如果未能解决你的问题,请参考以下文章
CTS测试CtsWindowManagerDeviceTestCases模块的testShowWhenLockedImeActivityAndShowSoftInput测试fail项解决方法(代码片段