å®éã®ã²ã
ããšãã°ãããããããã¹ãŠã®ä»äºãããŠãããã®ã倧奜ãã§ãã ãããã£ãŠãããããçš®é¡ã®ã¹ã¯ãªãããæ€æ»ãã¹ãã«ãã§ãã«ãŒããããŠãã¡ããèªåãã¹ããå¿ èŠã ãšèããŠããŸãã ãšããã§ããã®ãã¹ãã¯ã©ã®ããã«å¥œãã§ããïŒ
Browser.drive(driver: new InternetExplorerDriver()) { go "http://www.google.com" $('form', action:endsWith('/search')).q = ' geb spock' $('button', value:'').click() waitFor { $('#search') } assert $('#search').size() == 1 assert $('#search').find('li.g a.l').size() > 0 println " : " + $('#res').find('li.g a.l', 0).text() }.quit()
ãã®ãããªãã¹ãã¯éåžžã«èªã¿ããããšæãããŸã-ã©ã®èšèªã§ãã£ãŠãåé¡ãããŸããã ãã®ãããªäŸã䜿çšããŠãGebãGroovyãããã³ãããã©ã®ããã«æ©èœããã®ããŸã£ãããŸã£ããããããªãé¡äŒŒã®ãã¹ããäœæã§ããŸãã ããããå®å šã«ç解ããããã«ãåºæ¬ãããã«æ·±ãæãäžããŸãããã
GebãšSeleniumã«ã€ããŠ
æè¿ã»ã¬ã³ã®ããšãèããããšããªãã®ã¯èª°ã§ããïŒ ãããããç«è¬ãæ¶ããããšããªãããã¹ãŠã®ãã©ãŠã¶ãåãã§ãããšãŸã èããŠãã人ã ç§ã¯ããã«ã€ããŠé·ãé話ããªãã§ãããããã ç¥ã£ãŠããïŒ
- Seleniumã䜿çšãããšãèªååããããã¹ãããã©ãŠã¶ãŒã§çŽæ¥å®è¡ããŠãããããçš®é¡ã®äžå ·åãæ©èœãåçŸã§ããŸãã
- éåžžã®ãŠãŒã¶ãŒãè¡ãããšãã¹ãŠãã€ãŸããããã¹ãã®å ¥åãã¹ã¯ããŒã«ãããŠã¹ã®ç§»åãªã©ãè¡ãããšãã§ããŸãã åæã«ããã©ãŠã¶ã§ããŒãžã®åäœã泚ææ·±ã芳å¯ããŸãã
å®éãSeleniumã¯ã§ããã ãçŸå®ã«è¿ãæ¡ä»¶ã§ãã¹ãããããã®å®å šãªããããã§ãã ïŒæŽå²çã«ã¯ãRational Robotãæãåºãããšãã§ããŸããRationalRobotã¯Internet Explorerã«ãã£ãŠç ãæŸãŸãããããŒãžãšã®ããåãã®å¯èœæ§ããããã«ãããŸãããïŒ
Seleniumèªäœã«ã¯ããã¹ããèšè¿°ããããã®ããã€ãã®ãªãã·ã§ã³ããããŸãã
- JavaScriptã䜿çšããŸãã ãã¹ãã¯ãã©ãŠã¶ã§çŽæ¥å®è¡ãããããŒããããWebããŒãžã«çŽæ¥ã¢ã¯ã»ã¹ã§ãããããæäœãå®è¡ã§ããŸãã
- 管çãµãŒããŒçµç±ã å¥ã®ããã»ã¹ã§ãä»»æã®èšèªã®ãã¹ãã³ãŒããèµ·åãããŸãã ãã®ã³ãŒãã¯ããã©ãŠã¶ã«ã³ãã³ããéä¿¡ããããŒãžã®ã¹ããŒã¿ã¹ãå¶åŸ¡ã§ããç¹å¥ãªããã°ã©ã ã§ããWebDriverãåŒã³åºããŸãã
ãããã£ãŠã Gebã¯WebDriverã䜿çšããGroovyã«åºã¥ããå¥ã®ãã¹ãã©ã€ã¿ãŒã§ãã 以äžã®éæ³ã®èšèã䜿ã£ãŠãGroovyã¹ã¯ãªããå ã§Gebã䜿çšã§ããŸãã
@Grab(group='org.codehaus.geb', module='geb-core', version='0.6.2') @Grab(group='org.seleniumhq.selenium', module='selenium-api', version='2.14.0') @Grab(group='org.seleniumhq.selenium', module='selenium-firefox-driver', version='2.19.0') @Grab(group='org.seleniumhq.selenium', module='selenium-ie-driver', version='2.19.0') import geb.Browser import org.openqa.selenium.firefox.FirefoxDriver ...
Gebèšèª
GroovyïŒããã³ãã¹ãŠã®åçèšèªïŒã®æ©èœã®1ã€ã¯ãããããããŒãºã«å¿ããŠãå®å šã«èªèã§ããªãå¥ã®èšèªã«ç°¡åã«å€æã§ããããšã§ãã
ç§ãã¡ã®å ŽåãGebã¯ãã©ãŠã¶ãŒå¶åŸ¡èšèªãæäŸããŸãã 人éã®ãŠãŒã¶ãŒãã§ããããšã¯ãã¹ãŠå®è¡ã§ããŸãã
- URLããã©ããŒ
- ãã©ãŒã ã«èšå ¥ãã
- ããŠã¹ãåãã
- ãªã³ã¯ãã¯ãªãã¯ããŠãã ãã
- ããããçš®é¡ã®ãããã¢ãããŠã£ã³ããŠããã¬ãŒã ãæäœããŸãã
Browser.drive { go "http://www.gramant.ru" $('.block .caption', text: 'Grails') .closest('.block') .find('a', text: startsWith('')) .click() assert $('title', text:'Grails | Gramant').size() == 1 }
ã芧ã®ãšãããGebã§ã¯jQueryã«äŒŒãæ§æã䜿çšã§ããŸãïŒå®å šã«ã¯äžèŽããŸããïŒã ããã¯ãããŒãžå ã®å¿ èŠãªèŠçŽ ãèŠã€ããã®ã«äŸ¿å©ã§ãã clickïŒïŒã¡ãœããã䜿çšãããšãDOMèŠçŽ ãã¯ãªãã¯ããããæäœ<< -ããã¹ãããã©ãŠã¶ã«éä¿¡ãããããããšãã§ããŸãã
ããã²ãŒã·ã§ã³ã«ã¯ããã§ååã§ãã 確ãã«ã人ã¯ãŸã ããŒãžäžã®æ å ±ãèªãæ¹æ³ãç¥ã£ãŠããŸãã ãããè¡ãã«ã¯ã圌ãçŸåšã©ã®ããŒãžã«ããã®ããæåã«ç解ããŠãããšããã§ãããã ãŸãããã¹ãäžã®ããŒãžãäœã§ããããèããŠã¿ãŸãããã
ããŒãžãšã¢ãžã¥ãŒã«
ç§ãã¡ã¯åœããŸãã
go 'http://www.gramant.com'
ãããŠgramant.comã«è¡ããŸããã ããã§ããã®ããŒãžããèªããããšãã§ããŸãã ãšã©ãŒãåæããŠèŠã€ããŸãã ã ããïŒ ããã§ããªãã ãã©ãŠã¶ãããŒãžã«ããããããšã次ã®ããšãçºçããå¯èœæ§ããããŸãã - HTTPãªãã€ã¬ã¯ã
- ããã€ãã®äžå¯è§£ãªjavascriptã³ãŒããæ©èœããå¥ã®ããŒãžã«ãªãã€ã¬ã¯ããããŸãã
Gebã¯ãè«çããŒãžïŒããŒãžïŒãšããããã¢ãžã¥ãŒã«ïŒã¢ãžã¥ãŒã«ïŒã®äœ¿çšãææ¡ããŠããŸãã 次ã®äŸã§ããã説æããŠã¿ãŸãããã
ãªãããŒãžã®ãããªæœè±¡åãå¿ èŠãªã®ã§ããïŒ çŸåšã®URLãèŠãã ãã§ã誰ããç¥ã£ãŠããããã«æããŸãã ããšãã°ã次ã®ããã«ïŒ
class SearchResultsPage extends Page { static url = "/yandsearch" }
ããããåãè«çããŒãžã«å€ãã®ç°ãªãURLãšç¶æ ãå«ãŸããããšããããURLã«ãã£ãŠããŒãžã決å®ããããšã¯åžžã«æ£ãããšã¯éããŸããïŒäºæž¬äžèœã«å€æŽãããå¯èœæ§ããããŸãïŒã ããã¯ãããšãã°ã¿ã€ãã«ã§è¡ãããšãã§ããŸãã
class SearchResultsPage extends Page { static at = { $('title').text() ==~ '.*: .* ' } }
çŸåšã®ããŒãžã決å®ããä»ã®ãªãã·ã§ã³ããããŸãã ã芧ã®ãšããããããã¯ãã¹ãŠã¢ããªã±ãŒã·ã§ã³ã«å€§ããäŸåããŠããŸãã å€ãã®å Žåãå€ãã®ç°ãªãURLãåãããŒãžã«å¯Ÿå¿ããŠããŸãã å éšã³ã³ããã¹ãã«ãã£ãŠã¯ãåãURLã«è€æ°ã®ç°ãªãããŒãžã衚瀺ãããå ŽåããããŸãã äžè¬çãªå Žåãã®æ¬äŒŒããããã£ã«ã¯ããã©ãŠã¶ãçŸåšãã®ããŒãžã«ãããã©ãããå€æããããžãã¯ãå«ãŸããŠããŸãã
ã¢ãžã¥ãŒã«ã«é¢ããããã€ãã®èšèã ãã®å³ã¯ã ã¢ãžã¥ãŒã«ãããŒãžïŒãããã¯ïŒã®äžéšã§ãããããã€ãã®ããŒãžã«ååšããã¢ãžã¥ãŒã«ãããããšã瀺ããŠããŸãã ããšãã°ãYandexã®æ€çŽ¢æååã¯ãããŒã¿ã«ããŒãžãšæ€çŽ¢çµæã®äž¡æ¹ã§äœ¿çšã§ããŸãã ã¢ãžã¥ãŒã«ã®æå³ã¯ããã¹ãã³ãŒããåå©çšããããšã§ãã
ã¢ãžã¥ãŒã«ã¯ãããšãã°æ¬¡ã®ããã«å®çŸ©ã§ããŸãã
class LoginModule extends Module { static content = { username {} password {} loginButton { $("input", type: "submit") } } }
ãããŠããããã次ã®ããã«äœ¿çšããŸãã
class HomePage extends Page { static content = { login { module LoginModule } } } Browser.drive { to HomePage login.username << 'user' login.password << 'password' login.loginButton.click() }
ãã¡ãããããŒãžå ã®ã¢ãžã¥ãŒã«ã®å€ãã®ã€ã³ã¹ã¿ã³ã¹ãå®çŸ©ããæ©èœããããŸã-ããã¯ããããçš®é¡ã®ãªã¹ãã«åœãŠã¯ãŸããŸãã ããšãã°ãæ€çŽ¢çµæ-åçµæã¯ã¢ãžã¥ãŒã«ã«ãã£ãŠå®£èšã§ããŸãã ããã¯moduleListã³ã³ã¹ãã©ã¯ãã䜿çšããŠè¡ãããŸãããããã«ã€ããŠã¯è©³ãã説æããŸããã
AJAXããã³ãã¹ãŠããã¹ãŠããã¹ãŠ
çŸä»£ã§ã¯ããã©ãŠã¶å ã§å€ãã®é©ãã¹ãããšãèµ·ãããŸãïŒ
- AJAXãªã¯ãšã¹ã
- ã¢ãã¡ãŒã·ã§ã³
- ãã©ãã°ã¢ã³ããããã
- ããŸããŸãªãããã¢ãããŠã£ã³ããŠ
JavaScriptå€æ°ã«ã¢ã¯ã»ã¹ãã
jsãªããžã§ã¯ããä»ããŠã ã°ããŒãã« JavaScriptå€æ°ã®å€ã«ã¢ã¯ã»ã¹ã§ããŸãã
Browser.drive { assert js.myGlobalVar == 1 }
ã°ããŒãã«é¢æ°ã䜿çšã§ããŸãã
Browser.drive { js.globalCall() assert js.globalFunc() == 1 js."document.write"("go geb!") js.exec("return document.location.href") == 'http://www.gramant.ru' }
ãã®ã¡ã«ããºã ãå°ã䜿çšããã®ã§ãGebã¯ãã¹ãŠã®JavaScriptããŒã¿åïŒ ããã§èª¬æïŒãGroovyåã«æ£ããå€æããããšãããšæããŸãããæ¯ãèŠããŸããã
jQueryã䜿çšããŠããŠã¹ã€ãã³ãããšãã¥ã¬ãŒããããšäŸ¿å©ã§ãã Gebã¯ããã®çš®ã®åŒã³åºãã«ç¹å¥ãªjQueryããããã£ãæäŸããŸãã
Browser.drive { $("div#a").jquery.mouseover() }
ãã®è¡ã¯ããã¹ãæžã¿ã®ããŒãžã«jQueryããŒãžã§ã³1.4以éãããŒããããŠããå Žåã«ã®ã¿æ©èœããŸãã å®éããã®ãããªã³ãŒãã¯js.execïŒïŒã«å€æãããŸãã
åŸ æ©ç¶æ
äœããåŸ ã€ããšãã§ããŸããäœããã®çš®é¡ã®JavaScriptå€æ°ãèšå®ãããã waitForã³ã³ã¹ãã©ã¯ãã䜿çšããŠããŒãžã«ç¹å®ã®æ å ±ã衚瀺ããŸãã
Browser.driver { go 'http://www.youtube.com/watch?v=8d1hp8n1stA' $('button#watch-share').click() waitFor { $('#watch-actions-share').displayed } $('#watch-actions-share').find('button.share-panel-embed').click() waitFor { $('textarea.share-embed-code').displayed } println "Embed code : " + $('textarea.share-embed-code').value() }
ãã®ã¹ã¯ãªããã¯ãããã€ãã®ãã¿ã³ãæŒããŠã¢ãã¡ãŒã·ã§ã³ãå®äºããã®ãåŸ ã€ããšã§ãYouTubeãããªã®åã蟌ã¿ã³ãŒããååŸããŸãã
ãã¡ãããwaitForã¡ãœããã¯æ°žé ã«åŸ æ©ãããç¹å®ã®ã¿ã€ã ã¢ãŠãã«éãããšã¯ã©ãã·ã¥ãããã¹ããäžæããŸãã ããã©ã«ãã¯5ç§ã§ãã
WebElementãšã¢ã¯ã·ã§ã³ã®äœ¿çš
ãã©ãã°ã¢ã³ãããããã«ã€ããŠèª¬æããŸããã çŸåšïŒããŒãžã§ã³0.6.2ïŒGebã«ã¯ããã®ãããªæäœã®ããã®äŸ¿å©ãªæœè±¡åããããŸããã ãã ããWebDriverã€ã³ã¹ã¿ã³ã¹ã«ã¢ã¯ã»ã¹ããããšã§ïŒbrowser.driverãä»ããŠïŒSeleniumãçŽæ¥äœ¿çšããããšã¯åžžã«å¯èœã§ãã
WebElement underlyingElement = $('#myElement').getElement(0) Action action = new Actions(browser.driver) .clickAndHold(underlyingElement) .moveByOffset(15,15) .release() .build() action.perform()
Actionsã¯ã©ã¹ã¯ãperformïŒïŒã¡ãœããã«ãã£ãŠé 次å®è¡ãããããã«ããã©ãŠã¶ãŒã¢ã¯ã·ã§ã³ã®ã·ãŒã±ã³ã¹ãäœæããäœã¬ãã«ã®æ¹æ³ã§ãã Actionsã®æ©èœã¯ãJavaScriptã³ãŒãã®åŒã³åºãããã匷åã§ããããã¹ãŠã®ãŠãŒã¶ãŒã¢ã¯ã·ã§ã³ã¯JavaScriptãä»ããŠã·ãã¥ã¬ãŒãã§ãããšããäºå®ã«æ³šç®ããŠãã ããã ãã©ãŠã¶åŽã§ã®ã¢ã¯ã·ã§ã³ã®å®è£ ã¯ã䜿çšãããŠãããã©ã€ããŒã«å€§ããäŸåãã移æ€æ§ããããŸããã ã¿ããã¹ã¯ãªãŒã³ãæèŒããã¿ãã¬ããã§ã¿ããã€ãã³ããçæããããã®ã»ãšãã©ã®ãªãã·ã§ã³ã¯ãã¢ã¯ã·ã§ã³ã®äœ¿çšã®ã¿ã§ãã ããã€ãã®å¶éããããŸã-ã¢ã¯ã·ã§ã³ã§ã¯ãããŒãžäžã®Flashã³ã³ããŒãã³ããæäœã§ããŸããã ããã¯JavaScriptã䜿çšããExternalInterfaceãä»ããŠã®ã¿å¯èœã§ãããããã¯ã¯ããã«è€éã§ãã
Grailså ã®Geb
Grailsã§Gebã䜿çšããã«ã¯ã Spockãã©ã°ã€ã³ã䜿çšãããšäŸ¿å©ã§ãã ç§ã¯Spock Frameworkã«ã€ããŠé·ãéåºããŸãããããã«ã€ããŠã¯ååãªæ å ±ããããŸãã Spockã¯ãäž»ã«ã¡ã¿ä»æ§èšèªã§ïŒGroovyã«åºã¥ããŠïŒãã¹ããäœæã§ãããããæšæºã®JUnitããã䟿å©ã§ãã ããã¯ãããçããããè¡šçŸåè±ãã§ããããšãããããŸããã
Grails 1.3.xçšã®Gebã®ã»ããã¢ããã«é¢ããããã€ãã®èšèã ãã®ãããªãããžã§ã¯ãã®äŸã¯ã ãã¡ãããå ¥æã§ããŸã ã BuildConfig.groovyã®ç®çã®ã»ã¯ã·ã§ã³ã¯æ¬¡ã®ããã«ãªããŸãã
dependencies { test("org.seleniumhq.selenium:selenium-htmlunitdriver:$seleniumVersion") { exclude "xml-apis" } test("org.seleniumhq.selenium:selenium-chrome-driver:$seleniumVersion") test("org.seleniumhq.selenium:selenium-firefox-driver:$seleniumVersion") test "org.codehaus.geb:geb-spock:$gebVersion" } plugins { test ":tomcat:$grailsVersion" test ":hibernate:$grailsVersion" test ":geb:$gebVersion" test ":spock:0.5-groovy-1.7" }
çŸåšã®gebVersionã¯0.6.2ã§ãå¿ èŠãªãã®ã眮ãæããŸãã
Grailsã«ã¯ããã¹ã/ãŠããããšãã¹ã/çµ±åã®2çš®é¡ã®ãã¹ããããããšãããã£ãŠããŸãã Spockã¯ããã¹ã/æ©èœ-ãæ©èœããã¹ããè¿œå ããŸãã
æ©èœãã¹ãïŒSpockä»æ§ïŒå ã®Gebã¯éåžžã®ãã¹ããšäŒŒãŠããŸããããã©ãŠã¶ãŒãèµ·åããŠãã¹ãå ã§ãã©ã€ããŒãæ§æããå¿ èŠã¯ãããŸããããã¹ãŠã¯æ¢ã«è¡ãããŠããŸãã åçŽãªä»æ§ã®äŸïŒHomePageãLoginPageã¯ã©ã¹ã«ã€ããŠã¯ãã§ã«èª¬æããŠãããšæ³å®ããŠããŸãïŒïŒ
@Stepwise class CoreSpec extends GebReportingSpec { def "unauthorized user goes to login page"() { when: to HomePage then: at LoginPage } }
ä»æ§å ã®åã¡ãœããã¯åå¥ã®ãã¹ãã§ãã æåã¯ããã®ãã¹ãã¯ã¡ã€ã³ããŒãžã«ç§»åããããšããŸããããŠãŒã¶ãŒã¯ãã°ã€ã³ããŠããªããããLoginPageã§çµäºããå¿ èŠããããŸãã
ãã¡ããã以äžãå®çŸ©ããGebæ§æãã¡ã€ã«ããããŸãã
- 䜿çšãããã©ãŠã¶ãŒãšãã©ã€ããŒ
- ããŸããŸãªGebèšå®ïŒã¿ã€ã ã¢ãŠããªã©ïŒã
ããã§ååã®ããã§ãã å ¥åããïŒ
grails -Dgeb.env=firefox test-app :spock
ãããããããã§äœãããã¹ãããããšããŠããæ¹æ³ã確èªããŸãã
ChromeãšIEã§ã¯ãã¹ããæ©èœããªãããšãããã«ããããŸããã ãã®çç±ã¯ããŒããããæå ã®æ段ãªãã§ãHtmlUnitïŒãã¹ãã«ã¯åœ¹ã«ç«ããªãïŒãŸãã¯Firefoxãå®è¡ã§ããããã§ãã Firefoxçšã®æ°ãããããã¡ã€ã«ãèªåçã«äœæãããFirefoxDriverãä»ããåŸç¶ã®ç®¡çã®ããã«ãã©ãŠã¶ãŒããæ¡åŒµãããŸãã ã¯ããSelenium / Gebã¯Firefoxã§ããŸãåäœããŸããå ã éçºãããã®ã¯Firefoxã§ãã£ãããã§ãã
IEãšChromeã«é¢ããŠã¯ããã¹ãŠãå°ãè€éã§ãã äžè¬çãªç¶æ³ã¯ãã¿ãã¬ããããç解ã§ããŸãã
ãã©ãŠã¶ | å¿ èŠãªãã® | å¶éäºé |
---|---|---|
Firefox | - | äžéšã®OSã§ã¯ã TCPããŒããäžè¶³ããåé¡ã圱é¿ãåããŸãã |
ã¯ãã | ãã©ãããã©ãŒã åºæã®ãµãŒãã¹ïŒChromeDriverServiceïŒãããŠã³ããŒãããŠã€ã³ã¹ããŒã«ããå¿ èŠããããŸãã | Actions
ã®ãµããŒãã¯ãããŸããã |
ãªãã© | - | ããŒãžã§ã³11.5以äžã§ãäžåºŠã«1ã€ã®ãã©ãŠã¶ã€ã³ã¹ã¿ã³ã¹ã®ã¿ã |
ã€ã³ã¿ãŒããããšã¯ã¹ãããŒã©ãŒ | å¥ã®ãµãŒãã¹ã®èµ·åãå¿ èŠã§ãã ãã©ãŠã¶ã®äºåèšå®ãå¿ èŠã§ãïŒä¿è·ã¢ãŒãïŒã | ããŒãžã§ã³6ã7ã8ã9ã 1ã€ã®ãã©ãŠã¶ã€ã³ã¹ã¿ã³ã¹ã®ã¿ããµããŒãããŸãã |
SeleniumïŒããã³GebïŒãå ¬åŒã«ãµããŒãããŠãããã®ã¯äœã§ããïŒ
- iPhoneãã©ãŠã¶
- Androidãã©ãŠã¶
ãã©ãŠã¶ãã¹ããäœæããŸããïŒ
ãã©ãŠã¶ãŒãã¹ãã®çŸããã¯ãç¹å®ã®ãã©ãŠã¶ãŒã§ä¿èšŒãããåäœã§ãã
ãã ãããã©ãŠã¶ã¯æ¬¡ããã¹ãããŸãã
- åäœãé ãïŒåäœãã¹ããããã¯ããã«é ãïŒ-åã«ãã©ãŠã¶ã®åå¿é床ãå¶éãããŠãããšããäºå®ã®ãã
- è€éãªJavaScript / AJAX-fillingsããã¹ãããå Žå-æžãã®ãé£ããã
- ãµããŒããå¿ èŠã§ãã CSSã¯ã©ã¹ãšããŒãžéå±€ãå€æŽãããšããã¹ããäžæãããå¯èœæ§ããããŸãã ããã«ãååãšããŠããã®ãããªå°ããªèŠèŠçãªå€æŽã®æ°ã¯ãããŒã¿ããŒã¹ã¹ããŒããããžãã¹ããžãã¯ãªã©ã®å€æŽã®æ°ãããã¯ããã«å€ããªããŸãã
å ¬åŒã¯çŸããã§ããããµããŒãã®è€éããšãå埩ã®æåãã¹ãã®ã³ã¹ããäºåã«èŠç©ããããšãéåžžã«é£ãããããæå³ããããŸããã ããããå埩åæ°ãå¢ãããšããã¹ããèªååãããšããèãæ¹ããŸããŸãé ã«æµ®ãã¶ããšã¯æããã§ãã ãã©ãŠã¶ãã¹ãã®å®è¡é床ãé ãããšã«ããŸã泚æãæãããšã¯ã§ããŸãããããã¯ãæåãã¹ããå®è¡ãããããé«éã§ãã 確ãã«ãåŒã¯ãã¹ãŠã®æåäœæ¥ãèªååã§ããããã§ã¯ãªããšããäºå®ãèæ ®ããŠããŸãããããšãã°ããã¬ã€ã¢ãŠãããªããªã£ããããšãããããã«èª¬æããŠã¿ãŠãã ããã
ãã©ãŠã¶ã®ãã¹ãã«ã埮åŠãªç¹ããããŸãã ããšãã°ãSeleniumã¯ããã©ãŠã¶ãã¢ã¯ã»ã¹ããWebãµã€ãã«ã¢ã¯ã»ã¹ã§ãããã©ãããåžžã«åå¥ã«å€æã§ãããšã¯éããŸããã 確ãã«ãããšãã°ãã€ã³ã¿ãŒããããåæããå Žåããã©ãŠã¶ã¯äœãã衚瀺ããŠããããã§ãã ãã ããããã¯äºæ³ãããããŒãžã§ã¯ãªãããã€ã³ã¿ãŒãããèšå®ã確èªããŠãã ããããšããã¹ã¿ã€ã«ã®ãã©ãŠã¶å ã¡ãã»ãŒãžã§ãã ããããã¹ãŠã®ç¶æ³ã¯ããã¹ãããã±ãŒãžã«æ±ºå®ããŠå«ããå¿ èŠããããŸãã ããã«ãã¢ããªã±ãŒã·ã§ã³ãèªåãã¹ãã«é©åãããªããã°ãªããªãå Žåãããã劥åãå¿ èŠã«ãªããŸãã
äžè¬çã«ãããã¯ç°åžžã«èããããããããŸããããèªåãã¹ãã¯ããã°ã©ã ã§ãã ãããã£ãŠããã®éçºãšãµããŒãã¯ããã°ã©ããŒã«ä»»ããããšãã§ããŸãã ãã®ã¢ãããŒãã«ãããããã°ã©ããšãã¹ã¿ãŒã®éã®å³å¯ãªåæ¥ãæé€ãããŸãã ã¢ã»ã³ããªãšãã¹ãã®ç¢ºç«ãããã·ã¹ãã ã®æ çµã¿å ã§ãããã¹ããèªåã§ãèªåã§ãä¿®çããŠããšããååãé©çšãã人ãããŸãã ã€ãŸãã倧ãŸãã«èšã£ãŠã誰ããã¹ããæžããã®ãã¯åé¡ã§ã¯ãããŸãããäœæãããç¬éããå ±éã®ããããã£ã«ãªãããã¹ã¿ãŒãšããã°ã©ããŒã®äž¡æ¹ããã¹ããæ åœããŸãã
ãŸããããããèšé²-ãã©ãŠã¶ã§ã¢ã¯ã·ã§ã³ãèšé²ãããããã«åºã¥ããŠãã¹ããäœæããæ©èœã«ã€ããŠãèšåããå¿ èŠããããŸãã ãã®æ©èœã¯ãFirefoxã®Selenium IDEã«ãã£ãŠæäŸãããŸãã ããã¯çŽ æŽãããããã«èãããŸããããã®æ¹æ³ã§äœæããããã¹ãã¯éåžžå®å®æ§ãäœããã€ãŸããäœããã®ããŒãžå€æŽã§ç Žæããå¯èœæ§ãéåžžã«é«ããªããŸãã ããã¯ãèšé²ã察話ããããŒãžãããã¯ãæ£ããåŠçããæ¹æ³ãèªèããŠããªãããã«çºçããŸããCSSã¯ã©ã¹ãïŒidããŸãã¯ãã®ä»ã®æ¹æ³ã䜿çšããå¿ èŠããããŸããã ããã«ãããªãã®ããã®Seleniumãã¹ãã®ããžãã¯ïŒã¹ã¿ããã£ã³ã°ïŒã¯ãŸã æãä»ãããšãã§ããŸããã
èŠçŽãããšãGebã¯äœ¿ãããããéåžžã«æ©èœãã補åã§ãïŒSeleniumã¯Gebã®å®å®æ§ãæäŸãããããããŒãžã§ã³çªå·ã«ã¯ããŸã泚æãæã£ãŠããŸããïŒãGrailsã¢ããªã±ãŒã·ã§ã³ã®ãã©ãŠã¶ãŒãã¹ãã®äœæã«éåžžã«é©ããŠããŸãã 圌ãšäºäººããã«ããïŒ http : //gebish.org