FrontPage > SoftwareTest

ƥȼ¹ԴĶSeleniumˤWebƥȤˤĤơޤȤƤޤ

Selenium IDE

FirefoxΥץ饰ȤưޤWebʤ顢ưϿƥȤʤƤȤǽࡢ

ĤĴ٤ƤߤơºݤˤäƤߤȤΥ⡣1.0.6ưǧƤޤ

Ƴ

  • SeleniumeIDEFirefox˥ץ饰ȤƳ
    1. Seleniume HQ˹Ԥ
    2. Downloadڡ˹ԤäơSelenium IDEDownload򡣵ĥܥ򲡤ȡFirefoxΥץ饰󡦥󥹥ȡ뤬ȡ
    3. FirefoxƵươ֥ġץ˥塼SeleniumeIDEɲäƤOK

ϤƤΥƥ

  1. Firefoxǡ֥ġ-SeleniumeIDEפ
  2. ֥ޥɡסоݡס͡פꡣƥȥƥåפο֤򻲾ȡ
  3. ġСˤָߤΥƥȥ¹ԡץܥ򥯥å

ƥȥץ

ޥ(command)о(target)(value)ư
openhttp://www.catch.jp/blog2a/URL򳫤
assertLocationhttp://www.catch.jp/blog2a/URLǧ
assertTitlePlacebo EffectTitleפƤ뤫ǧ

¸ɹ

ΤϡŪʥץꥱƱ

  • ƥȥ¸֥ե-֥ƥȥ̾դ¸
  • ƥȥɹ֥ե-֥ƥȥ򳫤

ʵǽ

ƥȥΥޥɥꥹȤ򱦥å

  • ϰ֤λ/
  • ֥졼ݥȤλ/
  • Ȥ
  • ưḁ̇̄ץ⻣()

ʣΥƥȥޤȤ

ʣΥƥȥ¹Ԥϡ֥ƥȥȡפˤޤȤ롣

ƥȥȤϡ֥ơ֥ס֥ץ֤κ¦ɽ롣

selenium1.png

Selenium ޥ

ޤǡǿͤλ䤬ɤȤޥɤǤ

ɤȤޥ -

ޥ(command)о(target)(value)ư
openhttp://127.0.0.1/index.htmlURL򳫤
clickAndWaithttp://127.0.0.1/index.html󥯤򳫤

ɤȤޥ - ǧ

ޥ(command)о(target)(value)ư
assertLocationhttp://127.0.0.1/index.htmlURLǧ
assertTitlehello worldTitleפƤ뤫ǧ
assertTextPresenthello worldɽƤƥȤפƤ뤫ǧ
assertHtmlSourceglob:*<p*>hello world</p>*ɽƤHTMLפƤ뤫ǧ
assertElementPresentlink=󥯥ƥɽƤ󥯥ƥȤפƤ뤫ǧ(URLǤϤʤ)

ǧޥɤϡassert***бverify***⤢롣assertϤϡ顼ߡverfyϤϡ顼ǤƥȤ³ȤСڡܤassertTitledzǧͤverifyϤdzǧ롣

ɤȤޥ - Τۤ

ޥ(command)о(target)(value)ư
captureEntirePageScreenshot(¸ȥե̾)ߤβ̤򥭥ץ㤹(Ȥǻ)

ɽˤĤ

(Ȥǽ)

Ƽե

Selenium RC 

⡼ȥȥ(Remote Control:RC)ǤSeleniumޥɥ饤󤫤鼫ư¹ԤȤȤ˻Ȥ餷֥饦ФWebƥȤưSelenium (3/3) - Selenium RCǼưƥȤ¹ԤˤϡITûơͤˤʤޤ

Ƴ

С1.0.3ǻƤߤޤ20MB餤ޤ

  1. Downloads
  2. ɤzipեह
  3. ह̤ΥեեФƤΤǡselenium-remote-control-1.0.3פȤե
  4. 䤹褦C:\ľ˥եݤȥԡ(ʲRCե)

ȡJRE(Java Runtime Environment)ɬס

ϤƤΥ⡼ȥƥ

  1. ޥɥץץȤΩ夲
  2. ˥ԡRCե˰ư
cd C:\selenium-remote-control-1.0.3\selenium-server-1.0.3

ƥȥȤȥƥȥѰդƤϡc:\selenium\ץե¸

ƥȥȥץ

ƥȥץ

ǡޥɥ饤󤫤顢Υޥɤ¹(ºݤϡҤ³)ƥȥեǤϤʤƥȥȥեꤹ뤳ȡ

java -jar selenium-server.jar
 -htmlSuite
 "*firefox"<- ¹Ԥ֥饦
 "http://www.catch.jp/blob2a/" <- ƥоݤURL
 "c:\selenium\selenium_testsuite.html" <- ƥȥȥե
 "c:\selenium\result.html" <- ¹Է̥ե

ȡ¹Ծʤդɽ롣Ʊˡ֥饦ܥƥƤư¹ԡ

selenium_log.png

¹Է̤htmlեȤ¸롣

¹Է̥ץ

ͻ


  ȥå   ʬ Хåå   ñ측 ǽ   إ   ǽRSS
Last-modified: 2010-12-25 () 10:45:20 (2911d)