1、准备html文件
首先我们需要准备一个鼠标滑动的html文件,用来演示鼠标滑动的效果,注意需要将我们的html文件放在自己的服务器上,
这样我们才能够通过selenium来进行验证。html文件如下:
body {
margin: 0;
padding: 0;
}
input{
appearance:none;
-moz-appearance:none;
-webkit-appearance:none;
background: none;
border:none;
}
.wrap{
margin: 200px 0 0 200px;
}
.box {
position: relative;
width: 200px;
height: 30px;
border-radius: 20px;
background: #686B69;
line-height: 30px;
overflow: hidden;
margin-bottom: 40px;
color: #fff;
font-size: 12px;
}
.btn {
position: absolute;
top: 0;
left: 0;
height: 30px;
width: 30px;
background: #0c7;
border-radius: 20px;