摘要: from locust import HttpLocust,TaskSet,task import os class UserBehavior(TaskSet): @task def login(self): # 登录URL loginUrl = '/login' h = { "User-Agent 阅读全文
posted @ 2019-12-10 09:39 梅梅不想踩坑 阅读(839) 评论(0) 推荐(0)
摘要: selenium_login.py import unittest from selenium import webdriver class LoginTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.driver = webdriver.Chrome() cls.... 阅读全文
posted @ 2019-11-23 13:47 梅梅不想踩坑 阅读(1199) 评论(0) 推荐(0)
摘要: """ 生成随机姓名、电话号码、身份证号、性别、应行卡号、邮箱 """ import random from firstname import first_name from langconv import * from province_id import province_id from phone_number import phone_number # from langconv impo 阅读全文
posted @ 2019-11-12 10:31 梅梅不想踩坑 阅读(7047) 评论(2) 推荐(0)
摘要: #!/usr/local/bin/python3.7 # 用户注册 def logon(): print("欢迎来到图书管理系统注册页面~") username = input("请输入用户名:") if len(username)<6: print("用户名不能小于6个字符") else: ema 阅读全文
posted @ 2019-11-12 10:24 梅梅不想踩坑 阅读(14927) 评论(58) 推荐(1)
摘要: def func(): for i in range(2,1000): # count表示被整除的次数 count = 0 for j in range(1,i+1): if i%j==0: count+=1 # count==2说明,该数字只能被1和它本身整除... 阅读全文
posted @ 2019-11-12 10:17 梅梅不想踩坑 阅读(7776) 评论(0) 推荐(0)
摘要: # 使用for循环进行冒泡排序 import random # 定义一个空列表 list = [] i=0 # 生成10个不相等的随机数 while i<10: # 生成1-50之间的随机数 num = random.randint(1,50) if num not in list: # 将生成的随机数添加到列表 list.append(num) i += 1 else: continue pri 阅读全文
posted @ 2019-11-12 10:07 梅梅不想踩坑 阅读(218) 评论(0) 推荐(0)
摘要: 图片与图片上的文字设置不同的透明度的两种方法: 第一种方法:背景图+定位+background: url(timg.jpg)no-repeat; <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Documen 阅读全文
posted @ 2017-06-29 13:17 梅梅不想踩坑 阅读(23466) 评论(1) 推荐(1)
摘要: 多行文本省略号的实现 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> .d1 { width: 300px; height: 200px; border: 1 阅读全文
posted @ 2017-06-28 19:14 梅梅不想踩坑 阅读(257) 评论(0) 推荐(0)
摘要: 三级导航 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> * { margin: 0; padding: 0; } .qq { width:1050px; h 阅读全文
posted @ 2017-06-28 11:20 梅梅不想踩坑 阅读(6012) 评论(0) 推荐(0)
摘要: 二级导航 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> * { margin: 0; padding: 0; } .qq { width:1050px; h 阅读全文
posted @ 2017-06-28 11:13 梅梅不想踩坑 阅读(178) 评论(0) 推荐(0)