vagabond1-1983 / blog

My tech blog for achieve
GNU General Public License v2.0
2 stars 0 forks source link

【原】自动化之定位元素 #2

Open vagabond1-1983 opened 8 years ago

vagabond1-1983 commented 8 years ago
  1. 环境准备 a. Firefox 30.0 稳定版 b. Selenium IDE http://release.seleniumhq.org/selenium-ide/2.9.0/ c. firebug
  2. HTML技术储备 - 标签

http://www.w3school.com.cn/html/index.asp

根据w3school进行浏览 a. 元素

段落, html体,

布局 常用 b. 属性 name="value", class, id, title c. 样式

<p style="color: red; margin-left: 20px"> 
This is a paragraph
</p>

d. < table > e. < form > f. 框架

<frameset cols="25%,75%">
        <frame src="frame_a.htm">
        <frame src="frame_b.htm">
</frameset>
  1. Selenium IDE熟悉 录制,定位
  2. 几种常用的定位技术 a. id b. name c. css d. xpath 重点
  3. 特殊的定位技巧 a. iframe b. 兄弟,子节点的定位(靠相近元素定位) -- 非标准HTML标签 c. selenium bug,滚动到可见区域后find

视频地址:http://www.tudou.com/programs/view/QtmPYO0ExLw/