-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex13.html
More file actions
473 lines (417 loc) · 27.4 KB
/
index13.html
File metadata and controls
473 lines (417 loc) · 27.4 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
<!DOCTYPE html>
<html lang="cn">
<head>
<meta charset="utf-8" />
<title>python自动化测试人工智能</title>
<link rel="stylesheet" href="/theme/css/main.css" />
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="/">python自动化测试人工智能 </a></h1>
<nav><ul>
<li><a href="/category/ba-zi.html">八字</a></li>
<li><a href="/category/ce-shi.html">测试</a></li>
<li><a href="/category/ce-shi-kuang-jia.html">测试框架</a></li>
<li><a href="/category/common.html">common</a></li>
<li><a href="/category/da-shu-ju.html">大数据</a></li>
<li><a href="/category/feng-shui.html">风水</a></li>
<li><a href="/category/ji-qi-xue-xi.html">机器学习</a></li>
<li><a href="/category/jie-meng.html">解梦</a></li>
<li><a href="/category/linux.html">linux</a></li>
<li><a href="/category/python.html">python</a></li>
<li><a href="/category/shu-ji.html">书籍</a></li>
<li><a href="/category/shu-ju-fen-xi.html">数据分析</a></li>
<li><a href="/category/zhong-cao-yao.html">中草药</a></li>
<li><a href="/category/zhong-yi.html">中医</a></li>
</ul></nav>
</header><!-- /#banner -->
<section id="content" class="body">
<ol id="posts-list" class="hfeed" start="9">
<li><article class="hentry">
<header>
<h1><a href="/python3_crash3.html" rel="bookmark"
title="Permalink to [雪峰磁针石博客]python3快速入门教程1 turtle绘图-3循环">[雪峰磁针石博客]python3快速入门教程1 turtle绘图-3循环</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-09-02T10:20:00+08:00">
Published: 日 02 九月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <h2 id="_1">语法基础</h2>
<h3 id="for">for语句</h3>
<p>Python的for语句针对序列(列表或字符串等)中的子项进行循环,按它们在序列中的顺序来进行迭代。 </p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7
8</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="o">>>></span> <span class="c1"># Measure some strings:</span>
<span class="o">...</span> <span class="n">words</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'cat'</span><span class="p">,</span> <span class="s1">'window'</span><span class="p">,</span> <span class="s1">'defenestrate'</span><span class="p">]</span>
<span class="o">>>></span> <span class="k">for</span> <span class="n">w</span> <span class="ow">in</span> <span class="n">words</span><span class="p">:</span>
<span class="o">...</span> <span class="k">print</span><span class="p">(</span><span class="n">w</span><span class="p">,</span> <span class="nb">len</span><span class="p">(</span><span class="n">w</span><span class="p">))</span>
<span class="o">...</span>
<span class="n">cat</span> <span class="mi">3</span>
<span class="n">window</span> <span class="mi">6</span>
<span class="n">defenestrate</span> <span class="mi">12</span>
</pre></div>
</td></tr></table>
<p>在迭代过程中修改迭代序列不安全,可能导致部分元素重复两次,建议先拷贝: </p>
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span><span class="o">>>></span> <span class="k">for</span> <span class="n">w</span> <span class="ow">in</span> <span class="n">words</span><span class="p">[:]:</span> <span class="c1"># Loop over …</span></pre></div></td></tr></table>
<a class="readmore" href="/python3_crash3.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/python_pep8.html" rel="bookmark"
title="Permalink to python代码风格指南(PEP8中文版)">python代码风格指南(PEP8中文版)</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-08-21T14:50:00+08:00">
Published: 二 21 八月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <p>本文给出主Python版本标准库的编码约定。CPython的C代码风格参见<a href="https://www.python.org/dev/peps/pep-0007/">PEP7</a>。</p>
<p>本文和<a href="https://www.python.org/dev/peps/pep-0257/">PEP 257 文档字符串标准</a>改编自Guido最初的《Python Style Guide》, 并增加了Barry的<a href="http://barry.warsaw.us/software/STYLEGUIDE.txt">GNU Mailman Coding Style Guide</a>的部分内容。</p>
<p>本文会随着语言改变等而改变。</p>
<p>许多项目都有自己的编码风格指南,冲突时自己的指南为准。</p>
<h2 id="_1">一致性考虑</h2>
<p>Guido的关键点之一是:代码更多是用来读而不是写。本指南旨在改善Python代码的可读性,即<a href="https://www.python.org/dev/peps/pep-0020/">PEP 20</a>所说的“可读性计数"(Readability counts)。</p>
<p>风格指南强调一致性。项目、模块或函数保持一致都很重要。</p>
<p>最重要的是知道何时不一致, 有时风格指南并不适用。当有疑惑时运用你的最佳判断,参考其他例子并多问!</p>
<p>特别注意:不要因为遵守本PEP而破坏向后兼容性!</p>
<p>部分可以违背指南情况:</p>
<ul>
<li>
<p>遵循指南会降低可读性。</p>
</li>
<li>
<p>与周围其他代码不一致。</p>
</li>
<li>
<p>代码在引入指南完成,暂时没有理由修改。</p>
</li>
<li>
<p>旧版本兼容。</p>
</li>
</ul>
<h2 id="_2">代码布局</h2>
<h4 id="_3">缩进</h4>
<p>每级缩进用4个空格 …</p>
<a class="readmore" href="/python_pep8.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/testing_tools_mobile.html" rel="bookmark"
title="Permalink to [雪峰磁针石博客]软件测试专家工具包3移动端">[雪峰磁针石博客]软件测试专家工具包3移动端</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-08-21T11:30:00+08:00">
Published: 二 21 八月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/ce-shi.html">测试</a>.</p>
</footer><!-- /.post-info --> <h3 id="ui-automator">UI Automator</h3>
<p>UI Automator提供了一组API来构建基于交互UI的测试。API允许你执行操作,如打开设置菜单,非常适合黑盒自动化测试,在测试代码不依赖于应用的内部实现</p>
<p>uiautomatorviewer提供了一个方便的图形用户界面进行扫描和分析在Android设备上当前显示的UI组件。您可以使用此工具来检查的布局层次和查看UI组件。 </p>
<p>UiDevice类可以访问设备并进行操作。你可以调用它的方法来访问设备属性,如当前的方向或显示尺寸。该UiDevice类也让您执行操作,例如:旋转设备;按下D-pad按钮;按Back、Home、Menu等;打开通知树栏;当前窗口截图等。</p>
<p>应用相关的API: UiCollection枚举容器的UI元素以计数,或通过文字(或属性等)针定位子元素; UIObject表示是在设备上可见的UI元素; UiScrollable?:为可滚动UI容器提供查找支持; UiSelector?:查询一个或者多个UI元素; Configurator: 设置参数。</p>
<p><img alt="图片.png" src="https://upload-images.jianshu.io/upload_images/12713060-1edb5256ab4105cf.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></p>
<p>示例:更改语言</p>
<div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/env python</span>
<span class="c1"># -*- coding: utf-8 -*-</span>
<span class="kn">from</span> <span class="nn">uiautomator</span> <span class="kn">import</span> <span class="n">device</span> <span class="k">as</span> <span class="n">d</span>
<span class="n">d</span><span class="o">.</span><span class="n">screen …</span></pre></div>
<a class="readmore" href="/testing_tools_mobile.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/testing_tools_perf.html" rel="bookmark"
title="Permalink to [雪峰磁针石博客]软件测试专家工具包2性能测试">[雪峰磁针石博客]软件测试专家工具包2性能测试</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-08-20T16:35:00+08:00">
Published: 一 20 八月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/ce-shi.html">测试</a>.</p>
</footer><!-- /.post-info --> <h3 id="locust">Locust(推荐)</h3>
<p>了解服务器端性能的好工具。 语言python3。<a href="https://github.com/locustio/locust">源码</a> python3+ python2.7+ github上star和fork最多的性能测试工具。</p>
<p>Locust是易于使用、分布式的用户负载测试工具。用于网站(或其他系统)的负载测试,计算出系统可以处理并发用户数。</p>
<p>测试时大量蝗虫会攻击你的网站。每只蝗虫(或叫测试用户)可以自定义、测试过程由web界面实时监控。这能帮助测试并确定瓶颈。</p>
<p>Locust 完全基于的事件,单机可以支持数千用户。它不使用回调,而是基于轻量进程gevent, 能简单地实线各种场景。</p>
<p><img alt="流行的软件测试工具介绍" src="http://upload-images.jianshu.io/upload_images/12713060-acaee51940c65dca.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></p>
<h3 id="multi-mechanize">Multi-Mechanize(推荐)</h3>
<p>Multi-Mechanize 是一个开源的性能和负载测试框架,它并发运行多个 Python 脚本对网站或者服务生成负载(组合事务)。测试输出报告保存为HTML或JMeter的兼容的XML。Multi-Mechanize最常用于web性能 和可扩展性(scalability)测试,也适用于任何python可以访问的API。尤其适合后台性能测试。稍微懂点编程的话,这个工具会远强过商业 的性能测试工具。</p>
<p>主要特性:</p>
<ul>
<li>
<p>支持各种 HTTP methods</p>
</li>
<li>
<p>高级超链接和HTML表单支持 …</p></li></ul>
<a class="readmore" href="/testing_tools_perf.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/python3_lib_ftplib.html" rel="bookmark"
title="Permalink to [雪峰磁针石博客]python模块介绍-ftplib:FTP协议客户端">[雪峰磁针石博客]python模块介绍-ftplib:FTP协议客户端</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-08-20T16:20:00+08:00">
Published: 一 20 八月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <h2 id="_1">概述</h2>
<p>该模块定义了FTP类和一些相关项。FTP类实现了FTP协议的客户端。你可以用它来编写使用FTP的URL。有关FTP(文件传输协议)的详细信息,请参阅Internet RFC959 [tools.ietf.org/html/rfc959.html]。</p>
<h2 id="_2">快速入门</h2>
<div class="highlight"><pre><span></span><span class="n">In</span> <span class="p">[</span><span class="mi">1</span><span class="p">]:</span> <span class="kn">from</span> <span class="nn">ftplib</span> <span class="kn">import</span> <span class="n">FTP</span>
<span class="n">In</span> <span class="p">[</span><span class="mi">2</span><span class="p">]:</span> <span class="n">ftp</span> <span class="o">=</span> <span class="n">FTP</span><span class="p">(</span><span class="s1">'ftp.fi.muni.cz'</span><span class="p">)</span>
<span class="n">In</span> <span class="p">[</span><span class="mi">3</span><span class="p">]:</span> <span class="n">ftp</span><span class="o">.</span><span class="n">login</span><span class="p">()</span>
<span class="n">Out</span><span class="p">[</span><span class="mi">3</span><span class="p">]:</span> <span class="s1">'230-Hello...'</span>
<span class="n">In</span> <span class="p">[</span><span class="mi">5</span><span class="p">]:</span> <span class="n">ftp</span><span class="o">.</span><span class="n">login</span><span class="p">(</span><span class="s1">'andrew'</span><span class="p">,</span><span class="s1">'password'</span><span class="p">)</span>
<span class="n">Out</span><span class="p">[</span><span class="mi">5</span><span class="p">]:</span> <span class="s1">'230 Login successful.'</span>
<span class="n">In</span> <span class="p">[</span><span class="mi">6 …</span></pre></div>
<a class="readmore" href="/python3_lib_ftplib.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/python3_lib_binascii.html" rel="bookmark"
title="Permalink to [雪峰磁针石博客]python标准模块介绍- binascii 二进制和ASCII转换">[雪峰磁针石博客]python标准模块介绍- binascii 二进制和ASCII转换</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-08-20T16:17:00+08:00">
Published: 一 20 八月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <ul>
<li><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></li>
<li><a href="https://china-testing.github.io/python_books.html">python工具书籍下载-持续更新</a></li>
<li><a href="https://china-testing.github.io/python3_quick.html">python 3.7极速入门教程 - 目录</a></li>
</ul>
<h2 id="_1">简介</h2>
<p>binascii模块包含很多用来方法来转换二进制和各种ASCII编码的二进制表示法。通常不直接使用这些功能,而是使用封装模块,如uu, base64或binhex。binascii模块包含用C语言编写更快的低级功能,通常为高级模块所使用。</p>
<ul>
<li>
<p>功能:二进制和ASCII转换。</p>
</li>
<li>
<p>类型:标准模块</p>
</li>
<li>
<p>相关模块:</p>
<ol>
<li>
<p>base64 标准模块。</p>
</li>
<li>
<p>binhex 标准模块。</p>
</li>
<li>
<p>uu 标准模块。</p>
</li>
<li>
<p>quopri 标准模块。</p>
</li>
</ol>
</li>
</ul>
<h2 id="uu">Uu编码</h2>
<p>uu编码格式现在已经比较少使用(<a href="http://zh.wikipedia.org/wiki/Uuencode">http://zh.wikipedia.org/wiki/Uuencode</a>),相关函数binascii.a2b_uu(string)和binascii.b2a_uu(data)这里不做介绍。 更多资料参见:<a href="http://docs.python.org/2/library/uu.html">http://docs.python.org/2/library/uu …</a></p>
<a class="readmore" href="/python3_lib_binascii.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/python3_lib_base64.html" rel="bookmark"
title="Permalink to [雪峰磁针石博客]python标准模块介绍 -Base64: Base64, Base85等数据编码">[雪峰磁针石博客]python标准模块介绍 -Base64: Base64, Base85等数据编码</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-08-20T16:15:00+08:00">
Published: 一 20 八月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <h3 id="_1">简介</h3>
<p>功能:RFC 3548: Base16, Base32, Base64 数据编码。转换二进制数据为适合明文协议传输的 ASCII 序列。转换<br>
8bits 为每个字节包含 6,5 或 4bits 的有效数据,比如 SMTP, URL 的一部分或者 HTTP POST 的一部分。参考: RFC 3548。编码算法不同于 uuencode。 </p>
<p>类型:标准库<br>
相关模块:uu, binhex, uu, quopri</p>
<p>Base64 是一种基于 64 个可打印字符来表示二进制数据的表示方法。由于 2 的 6 次方等于 64,所以每 6 …</p>
<a class="readmore" href="/python3_lib_base64.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/python3_lib_platform.html" rel="bookmark"
title="Permalink to [雪峰磁针石博客]python模块介绍-platform:底层平台信息">[雪峰磁针石博客]python模块介绍-platform:底层平台信息</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-08-20T16:10:00+08:00">
Published: 一 20 八月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <h2 id="_1">解释器信息</h2>
<ul>
<li>
<p>platform.python_version(): 返回的Python版本字符串'major.minor.patchlevel'。sys.version有类似功能,但是返回的信息更多。</p>
</li>
<li>
<p>platform.python_version_tuple(): 返回Python版本 (major, minor, patchlevel)。</p>
</li>
<li>
<p>platform.python_build(): 返回元组(buildno, builddate),即Python版本号和日期。</p>
</li>
<li>
<p>platform.python_compiler():返回说明编译Python的编译器的字符串。</p>
</li>
<li>
<p>platform.python_branch():返回说明编译Python分支。</p>
</li>
<li>
<p>platform.python_implementation():返回Python实现,比如‘CPython’, ‘IronPython’, ‘Jython’, ‘PyPy’。</p>
</li>
<li>
<p>platform.python_revision():返回Python补丁版本号。 </p>
</li>
</ul>
<p>下面是ubuntu 16.04执行的结果:</p>
<div class="highlight"><pre><span></span><span class="n">In</span> <span class="p">[</span><span class="mi">1</span><span class="p">]:</span> <span class="kn">import</span> <span class="nn">platform</span>
<span class="n">In</span> <span class="p">[</span><span class="mi">2</span><span class="p">]:</span> <span class="n">platform</span><span class="o">.</span><span class="n">python_version</span><span class="p">()</span>
<span class="n">Out …</span></pre></div>
<a class="readmore" href="/python3_lib_platform.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/python3_crash2.html" rel="bookmark"
title="Permalink to [雪峰磁针石博客]python3快速入门教程1 turtle绘图-2函数">[雪峰磁针石博客]python3快速入门教程1 turtle绘图-2函数</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-08-20T12:20:00+08:00">
Published: 一 20 八月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <h2 id="_1">菲波那契序列:</h2>
<div class="highlight"><pre><span></span><span class="o">>>></span> <span class="c1"># Fibonacci series:</span>
<span class="o">...</span> <span class="c1"># the sum of two elements defines the next</span>
<span class="o">...</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">1</span>
<span class="o">>>></span> <span class="k">while</span> <span class="n">b</span> <span class="o"><</span> <span class="mi">10</span><span class="p">:</span>
<span class="o">...</span> <span class="k">print</span><span class="p">(</span><span class="n">b</span><span class="p">)</span>
<span class="o">...</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span> <span class="o">=</span> <span class="n">b</span><span class="p">,</span> <span class="n">a</span><span class="o">+</span><span class="n">b</span>
<span class="o">...</span>
<span class="mi">1</span>
<span class="mi">1</span>
<span class="mi">2</span>
<span class="mi">3</span>
<span class="mi">5</span>
<span class="mi">8</span>
</pre></div>
<p>本例的新特性。</p>
<ul>
<li>
<p>第一行和最后一行有多赋值:第一行变量a和b同时获得了新的值0和1。最后一行右边首先完成计算,右边的表达式从左到右计算。</p>
</li>
<li>
<p>条件(b < 10)为true时while循环执行。这里Python类似C ,任何非零整数都为true;0为 false。判断条件也可以是字符串或列表等序列;所有长度不为零的为true ,空序列为false。示例中的测试是一个简单的比较。标准比较操作符与C相同: <(小于 …</p></li></ul>
<a class="readmore" href="/python3_crash2.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/testing_tools_web.html" rel="bookmark"
title="Permalink to [雪峰磁针石博客]软件测试专家工具包1web测试">[雪峰磁针石博客]软件测试专家工具包1web测试</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-08-20T11:20:00+08:00">
Published: 一 20 八月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/ce-shi.html">测试</a>.</p>
</footer><!-- /.post-info --> <h2 id="web">web测试</h2>
<p>本章主要涉及功能测试、自动化测试(参考: <a href="https://china-testing.github.io/testing_automation_tips.html">软件自动化测试初学者忠告</a>)
、接口测试(参考:<a href="https://china-testing.github.io/testing_api_10min.html">10分钟学会API测试</a>)、跨浏览器测试、可访问性测试和可用性测试的测试工具列表。 安全测试工具和性能测试工具在其他章节。</p>
<h3 id="selenium">selenium</h3>
<p>web ui自动化测试的霸主,在爬虫领域也颇有市场。</p>
<p>官网 <a href="http://www.seleniumhq.org">http://www.seleniumhq.org</a></p>
<p>实例:</p>
<div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">selenium</span> <span class="kn">import</span> <span class="n">webdriver</span>
<span class="kn">from</span> <span class="nn">selenium.webdriver.common.keys</span> <span class="kn">import</span> <span class="n">Keys</span>
<span class="n">browser</span> <span class="o">=</span> <span class="n">webdriver</span><span class="o">.</span><span class="n">Firefox</span><span class="p">()</span>
<span class="n">browser</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s1">'http://www.yahoo.com'</span><span class="p">)</span>
<span class="k">assert</span> <span class="s1">'Yahoo'</span> <span class="ow">in</span> <span class="n">browser</span><span class="o">.</span><span class="n">title</span>
<span class="n">elem</span> <span class="o">=</span> <span class="n">browser</span><span class="o">.</span><span class="n">find_element_by_name</span><span class="p">(</span><span class="s1">'p …</span></pre></div>
<a class="readmore" href="/testing_tools_web.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="/index12.html">«</a>
Page 13 / 21
<a href="/index14.html">»</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">
<div class="blogroll">
<h2>links</h2>
<ul>
<li><a href="https://china-testing.github.io/testing_training.html">自动化性能接口测试线上及深圳培训与项目实战 qq群:144081101 591302926</a></li>
<li><a href="http://blog.sciencenet.cn/blog-2604609-1112306.html">pandas数据分析scrapy爬虫 521070358 Py人工智能pandas-opencv 6089740</a></li>
<li><a href="http://blog.sciencenet.cn/blog-2604609-1112306.html">中医解梦看相八字算命qq群 391441566 csdn书籍下载-python爬虫 437355848</a></li>
</ul>
</div><!-- /.blogroll -->
</section><!-- /#extras -->
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
</address><!-- /#about -->
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
</footer><!-- /#contentinfo -->
</body>
</html>