sunday_jia 发表于 2011-12-20 09:48

Selenium 介绍及使用

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><b><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">1.</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">介绍</span></b></p><p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span lang="ZH-CN" style="font-family: 宋体; color: black; "><p class="MsoNormal" style="margin-bottom: 12pt; line-height: normal; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; "><font class="Apple-style-span" size="2"><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">Part1:</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">简介</span></span><span class="apple-style-span"><span style="font-family: Arial, sans-serif; "><o:p></o:p></span></span></font></p>

<p class="MsoNormal" style="margin-bottom: 12pt; line-height: normal; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; "><font class="Apple-style-span" size="2"><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">Selenium</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">是一套完整的</span></span><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">Web</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">应用程序测试系统,它包含了测试的录制(</span></span><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">Selenium
IDE</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">)、编写及运行(</span></span><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">Selenium Remote
Control</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">)和测试的并行处理(</span></span><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">Selenium Grid</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">)。</span></span><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">Selenium</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">的核心</span></span><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">Selenium
Core</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">基于</span></span><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">JsUnit</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">,完全由</span></span><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">JavaScript</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">编写,因此可运行于任何支持</span></span><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">JavaScript</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">的浏览器上</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">。</span></span><span class="apple-style-span"><span style="font-family: Arial, sans-serif; "><o:p></o:p></span></span></font></p>

<p class="MsoNormal" style="margin-bottom: 12pt; line-height: normal; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: white; "><font class="Apple-style-span" size="2"><span class="apple-style-span"><span style="font-family: Arial, sans-serif; ">Part2:</span></span><span class="apple-style-span"><span lang="ZH-CN" style="font-family: 宋体; ">版本介绍</span></span><span class="apple-style-span"><span style="font-family: Arial, sans-serif; "><o:p></o:p></span></span></font></p>

<p class="MsoNormal"><font class="Apple-style-span" size="2"><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">(</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">1</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">)、</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">SeleniumIDE</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">:一个</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">Firefox</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">的附加组件,结合</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">Firefox</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">可以实现录制测试脚本,并在浏览器中模拟用户真实操作进行回放。而且可以生成一些简单的基于</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">Selenium Remote
Control</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">模式的简单代码。</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; "><o:p></o:p></span></span></font></p>

<p class="MsoNormal"><font class="Apple-style-span" size="2"><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">(</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">2</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">)、</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">Selenium Core</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">:整个测试机制的核心部分,即有</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">assertion</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">(断言)机制的</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">test suite runner</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">。它由一些纯</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">js</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">代码组成,可以运行在</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">windows/linux</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">的不同</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">browser</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">上</span></span><span style="line-height: 115%; font-family: Arial, sans-serif; "><br>
<span class="apple-style-span">Selenium Remote Control</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">:一个代理与控制端,可代替</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">Selenium core/
Selenium IDE</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">的</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">client</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">端</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">(</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">相当于通过编程来实现一切</span></span><span class="apple-style-span"><span style="line-height: 115%; font-family: Arial, sans-serif; ">)</span></span><span class="apple-style-span"><span lang="ZH-CN" style="line-height: 115%; font-family: 宋体; ">,是支持多语言的。</span></span></font><span style="font-size: 12pt; line-height: 115%; font-family: Arial, sans-serif; "><o:p></o:p></span></p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><b><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">2.</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">安装</span></b><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">step0:</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">前提,机器上有</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">JDK1.5</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">,</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">eclipse</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">,最好有能跑起来的</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">web</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">工程;</span><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp; </span></span><span style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">step1:</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">下载地址</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><a href="http://seleniumhq.org/download/"><span style="mso-bidi-font-size:11.0pt;
color:#3300FF">http://seleniumhq.org/download/</span></a>&nbsp;</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">页面中</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"> Selenuium Client
Drivers</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;
mso-bidi-font-family:宋体;color:black">下</span><span style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">java</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">版本的</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">client </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">以及</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">Selenium Server<o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">step2:</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">启动</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"> Selenium</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">的</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">server&nbsp;</span><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">java -jar&nbsp;selenium-server.jar</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;
color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><b><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">3.</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">测试</span></b><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">step1</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">:在</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">eclipse</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">中新建一个</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">java web</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">工程,加入</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">junit </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">和</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;selenium&nbsp;</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;
color:black">server </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">的</span><span style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">jar</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">包;</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span style="font-size:9.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><span style="mso-tab-count:1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">step2</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">:新建</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">java</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">文件代码如下:</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><o:p>&nbsp;</o:p></span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin:3.75pt;line-height:14.25pt"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">package</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;cn</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">edie</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
<br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">import</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">org</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">openqa</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">server</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">SeleniumServer</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">import</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;com</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">thoughtworks</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">DefaultSelenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">import</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;junit</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">framework</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">TestCase</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">public</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">class</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;Selenium&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">extends</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;TestCase</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">{</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">private</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;DefaultSelenium
selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;
color:#0000CC">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">private</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;SeleniumServer&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">server</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">public</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">void</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">setUp</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">()</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">throws</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">Exception</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">{</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">String</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">url</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">=</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"http://www.google.com"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selenium&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">=</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">DefaultSelenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">)</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">new</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;DefaultSelenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"localhost"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">,</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;4444</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">,</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"*iexplore"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">,</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">url</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#FF9900">//4444 is default
server port</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#FF9900"><br>
</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">start</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">();</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">server</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">=</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">new</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;SeleniumServer</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">();</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">}</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">protected</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">void</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;tearDown</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">()</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">throws</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">Exception</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">{</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">stop</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">();</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">server</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">stop</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">();</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">}</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">public</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">void</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;testGoogle</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">()</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">throws</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">Throwable</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">{</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">open</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"http://www.google.com/webhp?hl=en"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assertEquals</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"Google"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">,</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">getTitle</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">());</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">type</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"q"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">,</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"2012"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assertEquals</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"2012"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">,</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">getValue</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"q"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">));</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">click</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"btnG"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">waitForPageToLoad</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"5000"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assertEquals</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"2012 - Google
Search"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;
color:#0000CC">,</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;
color:black">&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;
color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;
color:red">getTitle</span><span style="font-size:10.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;
color:#0000CC">());</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">}</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">}</span><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">step3: </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">在文件上点右键</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"> run as-&gt;junit test </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">运行弹出浏览器窗口,自动测试。</span><span style="font-size:9.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><font class="Apple-style-span" face="'Courier New'"><span class="Apple-style-span" style="font-size: 12px; "><br></span></font></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><b><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">4.</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">用法:</span></b><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;background:white"><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">网上找到的用法。其他介绍:</span><span class="Apple-style-span" style="font-size: 12px; line-height: normal; "><a href="http://liujianguangaaa.blog.163.com/blog/static/3689529420103982551410/">http://liujianguangaaa.blog.163.com/blog/static/3689529420103982551410/</a></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;background:white"><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:#FF0102">1</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:#FF0102">、测试文本输入框</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;background:white"><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">假设页面上有一个文本输入框,我们要测试的内容是</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:
&quot;Times New Roman&quot;;mso-bidi-font-family:Consolas;color:black"> </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">在其中输入一些内容,然后点击一个按钮,看看页面的是否跳转</span><span style="font-size:10.0pt;
font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:
Consolas;color:black"><br>
</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:
宋体;color:black">到需要的页面。</span><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black"><o:p></o:p></span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin:3.75pt;line-height:14.25pt"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">public</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">void</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;test1</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">()</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">{</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">open</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"http://xxx.xxx.xxx/yyy"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">type</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"xpath=//input[@name='userID']"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">,</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"test-user"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">click</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"xpath=//input[@type='button']"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">waitForPageToLoad</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"2000"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;assertEquals</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">getTitle</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(),</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"Welcome"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">}</span><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">上面的代码是这个意思:</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black"><br>
1</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:
宋体;color:black">、调用</span><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:Consolas;
color:black"> selenium.open </span><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">方法,浏览器会打开相应的页面</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black"><br>
2</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:
宋体;color:black">、使用</span><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:Consolas;
color:black"> type </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">方法来给输入框输入文字</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black"><br>
3</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:
宋体;color:black">、等待页面载入</span><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:Consolas;
color:black"><br>
4</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:
宋体;color:black">、看看新的页面标题是不是我们想要的。</span><span style="font-size:10.0pt;
font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:
&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:#FF0102">2</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:#FF0102">、测试下拉框</span><span style="font-size:
10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:9.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black">java </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">代码</span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin:3.75pt;line-height:14.25pt"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">public</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">void</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;test1</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">()</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">{</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">open</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"http://xxx.xxx.xxx/yyy"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">select</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"xpath=//SELECT[@name='SBBUSYO']"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">,</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"index=1"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">click</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"xpath=//input[@type='button']"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">waitForPageToLoad</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"2000"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;assertEquals</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">getTitle</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(),</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"Welcome"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">}</span><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;word-break:break-all"><span style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;
color:black;display:none;mso-hide:all"><o:p>&nbsp;</o:p></span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in"></td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">可以看到,我们可以使用</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black"> select </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;color:black">方法来确定选择下拉框中的哪个选项。</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black"><br>
select </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;
mso-bidi-font-family:宋体;color:black">方法还有很多用法,具体去看看文档吧。</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:#FF0102">3</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:#FF0102">、测试</span><span style="font-size:
10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:#FF0102">check box</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black">java </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">代码</span><span style="font-size:10.0pt;
font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:
&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin:3.75pt;line-height:14.25pt"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">public</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">void</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;test1</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">()</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">{</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">open</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"http://xxx.xxx.xxx/yyy"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">check</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"xpath=//input[@name='MEICK_000']"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">click</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"xpath=//input[@type='button']"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">waitForPageToLoad</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"2000"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;&nbsp;assertEquals</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">getTitle</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(),</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"Welcome"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">}</span><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">我们可以使用</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black"> check </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;color:black">方法来确定选择哪个</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black">radio button</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:#FF0102">4</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:#FF0102">、得到文本框里的文字</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:9.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black">java </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">代码</span><span style="font-size:9.0pt;
font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:
&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin:3.75pt;line-height:14.25pt"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">assertEquals</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">getValue</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"xpath=//input[@name='WNO']"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">),</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"1"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><span style="mso-tab-count:
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size:9.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black">getValue </span><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">方法就是得到文本框里的数值,可不是</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black"> getText </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;color:black">方法,用错了可就郁闷了。</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black">5</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;
mso-bidi-font-family:宋体;color:black">、判断页面是否存在一个元素</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:9.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:#FF0102">java </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:#FF0102">代码</span><span style="font-size:9.0pt;
font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:
&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin:3.75pt;line-height:14.25pt"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">assertTrue</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">isElementPresent</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"xpath=//input[@name='MEICK_000']"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">));</span><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">一般这个是用来测试当删除一些数据后,页面上有些东西就不会显示的情况。</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:#FF0102">6</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:#FF0102">、判断下拉框里选择了哪个选项</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:9.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black">java </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">代码</span><span style="font-size:9.0pt;
font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:
&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin:3.75pt;line-height:14.25pt"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">assertEquals</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">getSelectedIndex</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"xpath=//SELECT[@name='HATIMING']"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">),</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"1"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">这个可以用来判断下拉框显示的选项是否是期望的选项。</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:#FF0102">7</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:#FF0102">、如果有</span><span style="font-size:
10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:#FF0102"> alert </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;color:#FF0102">弹出对话框怎么办?</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">这个问题弄了挺长时间,可以这样来关闭弹出的对跨框:</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:9.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black">java </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">代码</span><span style="font-size:9.0pt;
font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:
&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin:3.75pt;line-height:14.25pt"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">if</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">isAlertPresent</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">())</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">{</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">getAlert</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">();</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">}</span><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">其实当调用</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black"> selenium.getAlert() </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">时,就会关闭</span><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:Consolas;
color:black"> alert </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">弹出的对话框。</span><span style="font-size:
10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black"><br>
</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:
宋体;color:black">也可以使用</span><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:Consolas;
color:black"> System.out.println(selenium.getAlert()) </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;color:black">来查看对跨框显示的信息。</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">在测试的时候,有的人会显示许多</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black">alert </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;color:black">来查看运行时的数据,那么我们可以用下面的方式来关闭那些</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black"> alert:</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:9.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black">java </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">代码</span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin:3.75pt;line-height:14.25pt"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:blue">while</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">isAlertPresent</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">())</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">{</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;&nbsp;&nbsp;selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">getAlert</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">();</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;</span><span style="font-size:10.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black"><br>
</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">}</span><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:#FF0102">8</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:#FF0102">、如何测试一些错误消息的显示?</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:9.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black">java </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">代码</span><span style="font-size:9.0pt;
font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:
&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin:3.75pt;line-height:14.25pt"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">assertTrue</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">getBodyText</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">().</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">indexOf</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"</span><span lang="ZH-CN" style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:fuchsia">错误消息</span><span style="font-size:
10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:fuchsia">"</span><span style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:#0000CC">)&gt;=</span><span style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:black">0</span><span style="font-size:10.0pt;
mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;
font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">切记:</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black"> getBodyText </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">返回的时浏览器页面上的文字,不回包含</span><span style="font-size:10.0pt;font-family:
Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:Consolas;
color:black">html </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">代码的,如果要显示</span><span style="font-size:
10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black">html </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;color:black">代码,用下面这个</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black">:</span><span style="font-size:10.0pt;
font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:
&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:9.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black">java </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">代码</span><span style="font-size:9.0pt;
font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:
&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin:3.75pt;line-height:14.25pt"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">System</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">out</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">println</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">getHtmlSource</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">());</span><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:9.0pt;mso-bidi-font-size:
11.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><span style="mso-tab-count:
1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><span style="font-size:9.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">以上就是最常用的几个方法了,例如</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black"> click, type, getValue </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">等等。</span><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:Consolas;
color:black"><br>
</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:
宋体;color:black">还有就是一定要学习</span><span style="font-size:10.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:Consolas;
color:black"> xpath, </span><span lang="ZH-CN" style="font-size:10.0pt;
font-family:宋体;mso-bidi-font-family:宋体;color:black">其实</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black">xpath </span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;color:black">也可以有</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black">“</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;color:black">与、或、非</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:Consolas;color:black">”</span><span lang="ZH-CN" style="font-size:10.0pt;font-family:宋体;mso-bidi-font-family:宋体;color:black">的操作:</span><span style="font-size:10.0pt;font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
13.5pt;word-break:break-all"><span style="font-size:9.0pt;font-family:Consolas;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black">java </span><span lang="ZH-CN" style="font-size:9.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">代码</span><span style="font-size:9.0pt;
font-family:Consolas;mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:
&quot;Courier New&quot;;color:black"><o:p></o:p></span></p>

<table class="MsoNormalTable" border="1" cellspacing="0" cellpadding="0" width="95%" style="width:95.0%;background:#F1F1F1;border-collapse:collapse;border:none;
mso-border-alt:outset #999999 .75pt;mso-yfti-tbllook:1184;mso-padding-alt:
0in 0in 0in 0in">
<tbody><tr style="mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes">
<td style="border:inset #999999 1.0pt;mso-border-alt:inset #999999 .75pt;
padding:0in 0in 0in 0in">
<p class="MsoNormal" style="margin:3.75pt;line-height:14.25pt"><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">selenium</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">.</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:red">check</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">(</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:fuchsia">"xpath=//input[(@name='KNYKBN')and(@value='Y')]"</span><span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:#0000CC">);</span><span style="font-size:10.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;mso-fareast-font-family:
&quot;Times New Roman&quot;"><o:p></o:p></span></p>
</td>
</tr>
</tbody></table>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span style="font-size:9.0pt;font-family:&quot;Times New Roman&quot;,&quot;serif&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;mso-bidi-font-family:&quot;Courier New&quot;;
color:black"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><o:p>&nbsp;</o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span lang="ZH-CN" style="font-size:9.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">附</span><span style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">1</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">:</span><b><span style="font-size:13.5pt;mso-bidi-font-size:11.0pt;
font-family:&quot;Simsun&quot;,&quot;serif&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black">DefaultSelenium</span></b><b><span lang="ZH-CN" style="font-size:13.5pt;mso-bidi-font-size:11.0pt;font-family:宋体;
mso-bidi-font-family:宋体;color:black">方法</span></b><span style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><b><span style="font-size:13.5pt;mso-bidi-font-size:
11.0pt;font-family:&quot;Simsun&quot;,&quot;serif&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;
mso-bidi-font-family:&quot;Courier New&quot;;color:black"><a href="http://release.seleniumhq.org/selenium-remote-control/0.9.0/doc/java/com/thoughtworks/selenium/DefaultSelenium.html"><span style="color:#3300FF">http://release.seleniumhq.org/selenium-remote-control/0.9.0/doc/java/com/thoughtworks/selenium/DefaultSelenium.html</span></a></span></b><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;
color:black"><o:p></o:p></span></p>

<p class="MsoNormal" style="margin-bottom:0in;margin-bottom:.0001pt;line-height:
normal;background:white"><span lang="ZH-CN" style="font-size:9.0pt;font-family:
宋体;mso-bidi-font-family:宋体;color:black">附</span><span style="font-size:9.0pt;
font-family:&quot;Courier New&quot;;mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">2</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">:</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">XPath</span><span lang="ZH-CN" style="font-size:9.0pt;font-family:宋体;mso-bidi-font-family:宋体;
color:black">教程</span><span style="font-size:9.0pt;font-family:&quot;Courier New&quot;;
mso-fareast-font-family:&quot;Times New Roman&quot;;color:black">&nbsp;<a href="http://www.zvon.org/xxl/XPathTutorial/General_chi/examples.html"><span style="mso-bidi-font-size:11.0pt;color:#3300FF">http://www.zvon.org/xxl/XPathTutorial/General_chi/examples.html</span></a><o:p></o:p></span></p>
页: [1]
查看完整版本: Selenium 介绍及使用