摘要: This chapter is a tutorial introduction to page objects design pattern. A page object represents an area in the web application user interface that yo 阅读全文
posted @ 2016-09-08 14:50 sufei 阅读(336) 评论(0) 推荐(0) 编辑
摘要: These days most of the web apps are using AJAX techniques. When a page is loaded to browser, the elements within that page may load at different time 阅读全文
posted @ 2016-09-08 14:40 sufei 阅读(201) 评论(0) 推荐(0) 编辑
摘要: Selenium provides the following methods to locate elements in a page: find_element_by_id find_element_by_name find_element_by_xpath find_element_by_li 阅读全文
posted @ 2016-09-08 14:30 sufei 阅读(276) 评论(0) 推荐(0) 编辑
摘要: Explicit Waits Expected Conditions Expected Conditions Implicit Waits Remote WebDriver Taking a Screenshot Taking a Screenshot Using a FirefoxProfile 阅读全文
posted @ 2016-09-08 13:07 sufei 阅读(517) 评论(0) 推荐(0) 编辑
摘要: Example (python): Example(JavaScript): Selenium-WebDriver API Commands and Operations 1. Fetching a Page 2. Locating UI Elements (WebElements) By ID B 阅读全文
posted @ 2016-09-08 12:27 sufei 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 原文:http://blog.itpub.net/26250550/viewspace-1411768/ 通常在 Python 中,我们都被告知可以使用双下划线开头的方法名定义方法来达到私有函数的目标。事实上,这个认识是错误的,这个方法更多的是一个强拼硬凑的惯用法。首先,在 Python 中,就没有 阅读全文
posted @ 2016-09-01 15:18 sufei 阅读(1791) 评论(0) 推荐(0) 编辑
摘要: 继承是 OO 语言中一个最为人津津乐道的概念。许多 OO 语言都支持两种继承方式:接口继承和实现继承。 接口继承只继承方法签名,而实现继承则继承实际的方法。 由于函数没有签名,在 ECMAScript 中无法实现接口继承。ECMAScript 只支持实现继承,而且实现继承主要是依靠原型链来实现的。 阅读全文
posted @ 2016-08-25 15:13 sufei 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 创建对象 1. Object 构造函数 var person = new Object();person.name = "Nick";person.age = 29;person.job = "Software Engineer";person.sayName = function(){ alert 阅读全文
posted @ 2016-08-24 11:03 sufei 阅读(192) 评论(0) 推荐(0) 编辑
摘要: ECMA-262 把对象定义为:“无序属性的集合,其属性可以包含基本值、对象或者函数。” 严格来讲,这就相当于说对象是一组没有特定顺序的值。对象的每个属性或者方法都有一个名字,而每个名字都映射到一个值。 正因为这样,我们可以把 ECMAScript 的对象想象成散列表:无非就是一组名值对,其中值可以 阅读全文
posted @ 2016-08-23 10:57 sufei 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 图来源于:http://www.cnblogs.com/smoothLily/p/4745856.html 个人的理解: 1. 所有对象都有 __proto__属性,返回该对象的原型对象。例如f1由语句var f1 = new Foo()生成,那么f1.__proto__就是由构造函数Foo生成的原 阅读全文
posted @ 2016-08-22 13:53 sufei 阅读(178) 评论(0) 推荐(0) 编辑