登录函数传参 把登录单独出来,写一个函数,传2个参数user和psw,写用例的时候调用登录函数,输入几组user,psw参数化登录用例 测试用例传参需要用装饰器@pytest.mark.parametrize,里面写两个参数 第一个参数是字符串,多个参数中间用逗号隔开 第二个参数是list,多组数据 ...
分类:
其他好文 时间:
2020-06-27 22:49:41
阅读次数:
158
xxx.aspx页面和对应的xxx.aspx.cs的数据传递,然后实现登录验证并且将值保存到Session中,上次有用Ajax测试实现了,但是后面发现一个问题,Ajax传递到cs页面之后,如果要在被加上了 [WebMethod] 参数的静态方法中使用Session的话就会报错“ "未将对象引用设置到 ...
1、真实服务器packagemainimport("fmt""log""net/http""os""os/signal""strconv""syscall""time")typerealServerstruct{Addrstring}func(rs*realServer)HelloHandler(whttp.ResponseWriter,r*http.Request){data:=fmt.Spri
分类:
编程语言 时间:
2020-06-27 09:44:41
阅读次数:
70
请求相关的方法(request--HttpRequest对象) print(request.GET) # 包含所有的HTTP GET 参数的类字典对象 print(request.META) # 请求头信息 return render(request, 'project_home.html') pr ...
分类:
其他好文 时间:
2020-06-27 09:36:43
阅读次数:
50
url配置 无名分组 urlpatterns = [ url(r'^index/', views.index), url(r'^books/(\d{4})/', views.books),#无名分组 (\d{4}) ] def books(request,year):#这里的year对应的就是(\d ...
分类:
Web程序 时间:
2020-06-27 09:31:23
阅读次数:
76
方法1:浏览器调试方式 package.json修改: { "name": "electron-quick-start", "version": "1.0.0", "description": "A minimal Electron application", "main": "main.js", ...
分类:
系统相关 时间:
2020-06-27 00:23:03
阅读次数:
50
nginx配置http块中增加 client_max_body_size 200m; php-fpm的php.ini配置文件中增加: upload_max_filesize = 200M 如果不知道fpm下的php.ini在哪,可以直接grep upload_max_filesize -R /etc ...
分类:
Web程序 时间:
2020-06-26 23:57:29
阅读次数:
123
1、简单的抓取网页 from urllib import requestreq=request.Request("http://www.baidu.com")response=request.urlopen(req)html=response.read()html=html.decode("utf- ...
分类:
编程语言 时间:
2020-06-26 21:59:22
阅读次数:
62
Tableau Public从网站上下载的twbx文件加载时,报错。 An error occurred while communicating with Tableau Data Extract. Unable to connect to the server. Check that the se ...
分类:
其他好文 时间:
2020-06-26 18:19:10
阅读次数:
175
1.在路由处设置参数name Route::get('/index/{name}','Controller@index'); 2.接收name参数,使用view调用显示html页面 <?php namespace App\Http\Controllers; use http\Env\Request; ...
分类:
其他好文 时间:
2020-06-26 16:49:29
阅读次数:
73