対象èªè ã¨ç°å¢
ãWebãã©ã¦ã¶ã使ã£ããã¹ããèªååããOSSã®ãã¼ã«ãSelenium2ï¼WebDriverï¼ãã®ã¤ã³ã¹ãã¼ã«æé ã¨åºæ¬çãªä½¿ãæ¹ããç´¹ä»ãã¾ããæ³å®èªè ã¯ããã¹ãèªååã«èå³ã®ããããã°ã©ãã¼ã§ãã
ãSeleniumã«ã¯Selenium IDEã¨ãããã©ã¦ã¶æä½ãè¨é²ã§ãããã¼ã«ããããSeleneseã¨ããSelenium1ã«å¯¾å¿ããã³ãã³ããHTMLå½¢å¼ã§ä¿åãã¾ããããã«ãã£ã¦ãã³ã³ã¼ãã£ã³ã°ã§ãã¹ãã¹ã¯ãªãããä½æãããã¨ãã§ããã®ã§ãããWebDriverãããã°ã©ãã³ã°ã«ããå¹çåã®æ©æµãåãããã¨ãã§ãã¾ãããæ¬è¨äºã¯Selenium IDEãæ´»ç¨ããªããWebDriver使ã£ããã¹ãã¹ã¯ãªãããJavaï¼JUnitï¼å½¢å¼ã§æ¸ãã¦ããããã®æå¼ãã¨ãªã£ã¦ãã¾ãã
ãä»åçè ã使ç¨ããç°å¢ã¯ä»¥ä¸ã®ã¨ããã§ãã
- OSï¼Windows 7
- Javaï¼1.7
- Firefoxï¼24.0
- IEï¼10
- Chromeï¼30.0.1599.69 m
-
Selenium
- Selenium IDE 2.4.0
- selenium-2.35.0ï¼Selenium Client & WebDriverï¼
- IEDriverServer_Win32_2.35.3
- ChromeDriver 2.4
1 Selenium IDEã®ã¤ã³ã¹ãã¼ã«ã¨åä½ç¢ºèª
ãåæï¼Firefoxãã¤ã³ã¹ãã¼ã«ããã¦ãããã¨ã
1.1 Selenium IDEã®ã¤ã³ã¹ãã¼ã«
ãFirefoxã§http://docs.seleniumhq.org/download/ã«ã¢ã¯ã»ã¹ããSelenium IDEã®ãªã³ã¯ãã¯ãªãã¯ãã¦ãã®ã¾ã¾ã¤ã³ã¹ãã¼ã«ãã¾ãã
1.2 Selenium IDEã®åä½ç¢ºèª
ãï¼1ï¼ï¼»Firefoxï¼½-ï¼»Webéçºï¼½-ï¼»Selenium IDEï¼½ãé¸æãã¦èµ·åãã¾ãã
ãï¼2ï¼ä»¥ä¸ã®ãããªãããã¢ããã¦ã£ã³ãã¦ãéãã¾ãã赤æ å ã¯å·¦ããããã¹ãå®è¡ã¹ãã¼ã調æ´ã®ã¹ã©ã¤ãã¼ããã¹ãå®è¡ãã¿ã³ãè¨é²ãã¿ã³ã§ãã
ãï¼3ï¼å³ä¸ã®è¨é²ãã¿ã³ãæ¼ãã¨ããã©ã¦ã¶æä½ã®è¨é²ãéå§ãã¾ãã
ãï¼4ï¼https://www.google.co.jp/ã«ã¢ã¯ã»ã¹ããæ¤ç´¢ãã©ã¼ã ã«ãSeleniumãã¨å ¥åãã¦æ¤ç´¢ãã¿ã³ãã¯ãªãã¯ãã¾ããæ¤ç´¢çµæã表示ããããä¸çªä¸ã®ãªã³ã¯ãã¯ãªãã¯ãã¾ãã
ãï¼5ï¼ä»¥ä¸ã®ããã«æä½ãè¨é²ãããããè¨é²ãã¿ã³ãã¯ãªãã¯ãã¦è¨é²ãåæ¢ãã¾ãã
ãï¼6ï¼å®è¡ãã¿ã³ãã¯ãªãã¯ããè¨é²å 容ãåçããããã¨ã確èªãã¦ãã ããã以ä¸ã®ãããªã¨ã©ã¼ãçºçãã¦ãã¾ã£ãããã¹ã©ã¤ãã¼ãåããã¦ãã¹ãå®è¡ã¹ãã¼ãã調æ´ãã¦ãã ããã
ãï¼7ï¼typeã³ãã³ãã®å¤ãç·¨éãã¦ãæ¤ç´¢ãã¼ã¯ã¼ããå¤æ´ãã¦ã¿ã¾ãããã
ãï¼8ï¼å®è¡ãã¿ã³ãã¯ãªãã¯ãã¦ãå¤æ´å¾ã®æ¤ç´¢ãã¼ã¯ã¼ããå ¥åãããäºã確èªãã¦ãã ããã
1.3 Selenium IDEããJavaï¼JUnitï¼å½¢å¼ã®ãã¹ãã³ã¼ããã¨ã¯ã¹ãã¼ã
ãSelenium IDEã§è¨é²ããæä½ããWebDriverå½¢å¼ã§ã¨ã¯ã¹ãã¼ããã¦ã¿ã¾ããããJavaãRubyãC#ãªã©ã®è¨èªã使ç¨ã§ãã¾ãããããã§ã¯Javaï¼JUnitï¼å½¢å¼ã§ã¨ã¯ã¹ãã¼ããã¾ãã
ãï¼1ï¼å·¦ãã¤ã³ã®ä¸è¦§ãã対象ã®ãã¹ãã±ã¼ã¹ãé¸æããï¼»ãã¡ã¤ã«ï¼½-ï¼»ãã¹ãã±ã¼ã¹ãã¨ã¯ã¹ãã¼ãï¼½-ï¼»Java/JUnit4/WebDriverï¼½ãé¸æãã¾ãã
ãï¼2ï¼ä»»æã®å ´æãæå®ãã¦GoogleTest.javaã¨ããååã§ä¿åãã¾ãããã®ãã¹ãã³ã¼ãã¯ã以éã®WebDriverã®åä½ç¢ºèªã§è©³ãã説æãã¾ãã