51 Elliot: Selenium IDE Flow Control – Goto and While Loops

February 21st, 2010

51 Elliot: Selenium IDE Flow Control – Goto and While Loops.

This exension provides goto, gotoIf and while loop functionality in Selenium IDE. Selenium IDE is a plugin for Firefox that automates the testing of web-based applications. There is an excellent flow-controll extension for the Selenium Server and TestRunner components, but it does not work with Selenium IDE (the Firefox plugin) directly. This makes it difficult to develop controlled test cases within Selenium IDE, and there are times when the frame-based TestRunner cannot be used (such as when the website under test employs a frame-buster script).

I’ve ported the existing control-flow extension to work in the Selenium IDE Firefox add-on. The image below shows a sample test case using goto, gotoIf and a while loop, all running successfully in Selenium IDE.


The file linked at the end of this post should be saved as “goto_sel_ide.js” to your hard drive. Then the Options settings in Selenium IDE should set the Selenium Core extensions to include the path of this file, similar to the image below.


Link:

Download goto_sel_ide.js here

Copy & Paste the contents into a new file and save it as “goto_sel_ide.js” in a location such as C:\Documents and Settings\goto_sel_ide.js and configure the Selenium Options tab as shown.  NOTE: please copy and paste the text rather than downloading the file – some people have had formatting issues that prevented the dowloaded file from working. So COPY & PASTE and you should be fine.

Update 26 February, 2006:
This mod of the FlowControl extension works only with the Selenium IDE Firefox add-on. If you want to use the TestRunner component or Selenium RC, please use the original FlowControl extension.

admin Tech

So you want to become an automated tester

February 16th, 2010

Geeks-R-Us: So you want to become an automated tester.

都来做自动化测试开发吧,这是给经验较少的手工测试工程师来看的。

admin Tech, 职场 ,

InfoQ: JSON作者、Yahoo!资深架构师Douglas确认QCon北京2010演讲题目

February 10th, 2010

InfoQ: JSON作者、Yahoo!资深架构师Douglas确认QCon北京2010演讲题目.

这是即将在今年4月23-25日知春路京仪大酒店举行的QCon 2010技术大会中,Browser as a Platform(简称BaaP)主题中会带来分享题目的诸位讲师。这会是此界QCon中非常有亮点的主题,在前端工作日显重要的今天。

————————–

对下届QCon的一点想法:移动开发,尤其是在企业级中的应用,应该会是一个很好的主题。

admin Tech, 随笔

InfoQ: 让测试也敏捷起来

February 10th, 2010

InfoQ: 让测试也敏捷起来.

我觉得段念讲解的内容是有一定参照价值的。只是敏捷测试的理念,是需要公司文化和工作氛围来共同推动的,自下而上的促进难度可想而知。仅仅从测试工程师的角度来做,任重而道远。

一些要点:

1、敏捷测试是以自动化测试(单元测试、验收测试)、持续集成为前提的,脱离这个,还依赖大量的手工测试,基本属于白扯。

2、开发和测试角色和责任不再那么明确划分甚至对立,测试不再仅仅满足于发现缺陷,而是共同提高产品质量,甚至促进软件开发过程改进。

3、开发负责大量的测试工作(单元测试),这很重要,这才可以从一定程度上提高质量,解放测试,让测试更有精力投放在明确客户需求、探索性测试等工作上面。

admin 工作日记, 随笔

[ZZ]IBM高绩效的薪酬文化

February 8th, 2010

IBM高绩效的薪酬文化_IT客_新浪博客.

这个IT客真是IBM通啊,发表的内容基本全是IBM相关的。这篇里面,IBM知道的,不知道的,体验没体验过的,他都知道。

admin 职场

dojo.data.util.simpleFetch

February 8th, 2010

dojo.data.util.simpleFetch.fetch = function(/* Object? */ request){ …… }

这是simpleFetch在dojo site上的文档,格式很糟,http://api.dojotoolkit.org/jsdoc/1.3.2/dojo.data.util.simpleFetch,我分了段贴在这里。

The simpleFetch mixin is designed to serve as a set of function(s) that can be mixed into other datastore implementations to accelerate their development.

The simpleFetch mixin should work well for any datastore that can respond to a _fetchItems() call by returning an array of all the found items that matched the query.

The simpleFetch mixin is not designed to work for datastores that respond to a fetch() call by incrementally loading items, or sequentially loading partial batches of the result set.

For datastores that mixin simpleFetch, simpleFetch implements a fetch method that automatically handles eight of the fetch() arguments — onBegin, onItem, onComplete, onError, start, count, sort and scope.

The class mixing in simpleFetch should not implement fetch(), but should instead implement a _fetchItems() method.

The _fetchItems() method takes three arguments, the keywordArgs object that was passed   to fetch(), a callback function to be called when the result array is available, and an error callback to be called if something goes wrong.

The _fetchItems() method should ignore any keywordArgs parameters for start, count, onBegin, onItem, onComplete, onError, sort, and scope.

The _fetchItems() method needs to correctly handle any other keywordArgs parameters, including the query parameter and any optional parameters (such as includeChildren).

The _fetchItems() method should create an array of result items and pass it to the fetchHandler along with the original request object — or, the _fetchItems() method may, if it wants to, create an new request object with other specifics about the request that are specific to the datastore and pass that as the request object to the handler.

For more information on this specific function, see dojo.data.api.Read.fetch()

dojo.data是个很强大的功能,提供了统一的数据处理接口,以及可用于对8个handler调用的机会:onItem, onBegin, onComplete, onError等等。开发者需要做的就是,自己实现_fetchItems()并在其中调用simpleFetch.fetch中定义的两个handler。在实际使用时,开发者需要调用的仍然是datastore的fetch方法。

admin Tech

昭昭满月【2010.2.6,睡觉很轻,翻身,坐肚,绿便】

February 6th, 2010

这段时间带孩子是很辛苦的,夜里需要3次喂奶,因为我要上班,夜里的事情都是妈妈和姥姥在忙,很累。妈妈有过夜里起来给宝宝喂奶,但这样会让未恢复的身体更加劳累,而且腰疼,所以改成夜里只喂奶粉。

爷爷奶奶都说孩子跟我小时候简直一模一样,看得出他们很喜欢,爷爷照顾起来也很细心很耐心。只是奶奶的身体开始出现这样那样的问题,看来是终究破不了在北京只能待一月左右的魔咒。我在酷讯上淘了两次票,爸爸也是满城跑来跑去取回了车票,在月子未满还差一周的时候送他两上了火车。离开那天,昭昭先是呛奶,又是爆哭,撕心裂肺,全身发紫,让大人们很心疼,结果还是爷爷发现了原因:没能察觉的连续第二次臭臭。奶奶说宝宝这是闹情绪了,不让爷爷奶奶走呢!

第十八天,昭昭差点给自己翻了个身,当时让妈妈和姥姥在旁边都看傻了。第二十二天,肚脐上干净了。

从出生到现在,除了有两次时间稍微长点,其他基本都是一天一次臭臭,这很难得,说明他的胃发育得不错。奶奶说这在老家叫坐肚,一般都是满月后的小孩才有这样的表现。但说小孩子是不能夸的,结果昭昭现在经常臭臭完了发现是绿便。绿便的原因有三:一是母乳喂养,二是饥饿,三是受到惊吓。前两条都不满足,但昭昭睡觉很轻,稍微一点动静就会容易从睡梦惊醒,这点像谁呢,像妈妈。

孩子姑姑也来了,特地从唐山出差完连夜赶到北京来看侄子的,带来了帅帅的衣服。在爷爷奶奶离开之后,又帮着照料了两天。姑姑一走,人手一下少了,我还要上班,照顾宝宝的重任全落到姥姥和妈妈身上,再坚持十天孩子姥爷就从东北来了,坚持坚持!

100_5663

admin 随笔