既然选择远方,便只顾风雨兼程……

两个WEB自动化测试工具比较 WatiN & Selenium RC

上一篇 / 下一篇  2008-04-06 16:35:02 / 个人分类:测试职业历程

Item51Testing软件测试网C L UD4EDg&Q'Td

WatiN

1} ?KG%j3p,mu0

Selenium RC51Testing软件测试网DVk Dck

Explorer Supported

v#TW#oV0

Known work

6R6\O0o4t^4b&p0

Ø IE 6 and IE 7

Prb LxJ#L$x+a0

Known work

{2[@${0p/m4mU0

Ø IE 6 and IE 7

;wj-A,dB"Ug0

Ø Firefox 1.5.0 and 2.051Testing软件测试网ct UF1[4]? f

Ø Opera 8.5.4 and 9.0.2

'Js*Nb@.qO5]0

Should work

M B5Y-{&\+~-Q)af f0

Ø Firefox 0.8 to 2.0

N%V(wRq6V#eC0

Ø Mozilla Suite 1.6+, 1.7+51Testing软件测试网%[aUA7Qx6O

Ø Sea monkey 1.051Testing软件测试网)Xz7B6X"H}

System supported51Testing软件测试网6G1qh;x+`3H;G1a*A

Known work

4ymS| i,PI;oxZ0

Ø Windows XP and 200351Testing软件测试网2K ~G;_*a)e&W*}"T

Known work

$A8j4rj#EPV0

Ø Windows XP and 200351Testing软件测试网.y3EqNt } }

Ø Windows 2000(need to installinstall reg.exein order to use IE)51Testing软件测试网Te nce3}

Ø Mac OS X

&gm!|k5q&C*V0

Ø Linux

_ S+}Q\pG0

Language supported51Testing软件测试网)CcBTaAv

Ø C#51Testing软件测试网;vk8H\0x

Ø C#

6d*_qiJv ~0

Ø Java51Testing软件测试网-k&PiGF9G

Ø Perl

D/D){lXUi6[,t(Q&[4W8J0

Ø PHP

w@xi6d:_H3o9[0

Ø Python

-S;b!|5q&S0

Ø Ruby

,c jM|~z_i\0

Test environment supported51Testing软件测试网9x,AO#iWS-n

Ø Visual Studio 2005 Team System51Testing软件测试网.}U&QZ0q+U-ZD

Ø Visual Studio 2005 Team System51Testing软件测试网ZQG;r!ohN

AJAX

u.{{*Upe%J0

Supports AJAX website testing

,iMd6K!LN5I3q0

l Selenium Server communicates directly with the browser using AJAX (XmlHttpRequest)51Testing软件测试网}0MDg+X7k

l The Selenium Server is great for testing complex AJAX-based web user interfaces under a Continuous Integration system

O9??"z#FOh3`-]4pN0

Get/Post requests

BuE*[*] Hf-W!w+Q9C0

 51Testing软件测试网:x/EOb&z Yx P@

We can send commands directly to the Server using simple HTTP GET/POST requests

"}2jU"M\ d;P3^){X0

Https supported

!J'p,{2f)Nu\"T-\z0

 

^)\?9t(\+h?7dS+A0

Support for https51Testing软件测试网@ F}7yf n2I'o

Javascrīpt Supported51Testing软件测试网fh*EtD4m

Void Document.Runscrīpt(string)

Uw!?`WHdxh&R0

l We can write selenium RC tests in Javascrīpt with JsUnit.51Testing软件测试网%~[M})S n8Z

l itAllows a Selenium-enabled browser to run Javascrīpt on arbitrary websites.

2rQU,w1NV7N Y:V,M,]0

HTML

.o\&n0X]a0uK#U0xF0

Automates all major HTML elements and find elements by multiple attributes

Rs&W4~g0

 

@A6Glg(v-lx0

HTML dialogs51Testing软件测试网4O.L;o~8X-M4~/q

Supports HTML dialogs (modal and modeless)51Testing软件测试网'p0])k#wP+gK

 51Testing软件测试网(H3w0j^k

Frame51Testing软件测试网KV%M9]4c{

Supports frame (Cross domain) and iframes51Testing软件测试网:Km,y!Wv%v:Y4c

 51Testing软件测试网#KQ|_c

Popup dialogs51Testing软件测试网btZo'\-K }?"n r}

Supports popup dialogs like alert, confirm, login etc51Testing软件测试网9R5k1["GV X3Rb(gH

 51Testing软件测试网S(m UV%S$f

Screenshots

od*|Yu%a0

Support creating screenshots of web pages51Testing软件测试网)R|f5[$nvj

 51Testing软件测试网lt;?~"Dmtf

 

-@%z l;g*y$e G6Kub0

 

3HR6X!oY-~8F C0

对现有控件的兼容性不好。比如文件上传控件和日历控件就无法在Selenium RC中捕捉51Testing软件测试网u|v'C'O+d(@r
2.
不支持https连接方式??

6iX&t D `*g-^%P0

http://bbs.51testing.com/thread-84131-1-6.html51Testing软件测试网glv1aU }%X$pTf&h.C$q

Developing Info

Item51Testing软件测试网6w^2j9DN7mn!q

WatiN51Testing软件测试网2tc)Tk8qw1E

Selenium RC51Testing软件测试网 T(qgw hj

Developing Language

DN"]!UY,l7V0

Ø C#

3ly+k1a2IR]0

Ø Java and so on

9i.\sOm0

Methods Example

Item51Testing软件测试网1M C(V0mf/j

WatiN Example51Testing软件测试网Tq8]8oc%a$X#a

Selenium RC Example

#p:UP,D_;G+[0

Set element51Testing软件测试网 `9I kTL,R7t

event51Testing软件测试网#}$Z R E$eM5C&_ dZ

Document.button(Find.ById(btnG”)).click()51Testing软件测试网%PD;Wd9sWO

DefaultSelenium.Type(“q”,”hello world”)

*b yL [P"h0

Get element attributes51Testing软件测试网1F.urfc$sN7t [B

Document.button (Find.ById(btnG”)).Style. Height

~L.Aj)c6g6]|%Oi0

DefaultSelenium.GetElementHeight(“q”)51Testing软件测试网6?/~.XxY3X T

especial methods

V$Ab#lo0

                             

,H8^1Yv ZZ0

Then we can’t hanle the time used for pages loading.

r-x;P!eY0

                          ===51Testing软件测试网 U)F#? QEW+zN

 

5V,L&M1?`lXa0

 

/pI hV8s#iiB.r0

 

Ee!{,L+P$F.y0

Ø Link[1].Click()

%y z1p R0t,[ ZFi0

Ø Link(Find.ByIndex(1)).Click()51Testing软件测试网'N.v }/A5f M L8d#Ko

We can use these two methods to click the links that the value is null.

R TY6U/P9l _0

Ø WaitForPageToLoad(“5000”)

E+x!p`#B(Z0

(if we want to go to another page and get the elements in the new page, we have to use the method, or we will in the old page.)

`"jM!Qy,Z%O;^0

 51Testing软件测试网}io]F!B

 51Testing软件测试网 JDT|c)[K

==   We can’t find the links that the value is null51Testing软件测试网#zxj/g7b9u


TAG: web 自动化测试 WatiN Selenium RC 测试

v_dozhan的个人空间 引用 删除 v_dozhan   /   2011-10-18 14:31:00
5
 

评分:0

我来说两句

Open Toolbar