Kaigi on Rails 2022ã®ç»å£è³æã§ãï¼ https://kaigionrails.org/2022/talks/ikumatdkr/
github.com ä»åã¯ã軽éã§å¤æ©è½ãª Selenium Grid ã§ãã Selenoid ã«ã¤ãã¦ã¾ã¨ãã¦ã¿ã¾ãã ç®æ¬¡ Selenium Grid ã¨ã¯ï¼ Selenoid ã¨ã¯ï¼ 軽é ã»ãã·ã§ã³ãã¨ã« Node ãä½æããã 便å©ãªæ©è½ Getting Started Selenoid ã®èµ·å ã¹ãã¼ã¿ã¹ãã§ã㯠ãã¹ã Live ãã©ã¦ã¶ã¹ã¯ãªã¼ã³ é²ç» ãã°åå¾ Selenoid ã®åæ¢ Docker ã®æ¨å¥¨è¨å® ãã©ã¦ã¶ã®è¨å®ãã¡ã¤ã« ãã®ä»ã®æ©è½ ã¾ã¨ã Selenium Grid ã¨ã¯ï¼ ã¾ãããããªã Selenoid ã«ã¤ãã¦æ¸ãåã«ããã®åæã¨ãªã Selenium Grid ã«ã¤ãã¦ç°¡åã«èª¬æãã¾ãã ãã©ã¦ã¶ãã¹ãã®èªååãªã©ã§ãã使ããã Selenium ã§ããã並åã§è¤æ°ã®ãã©ã¦ã¶ã使ç¨ã㦠Selenium ãã¹ããå®è¡ããã¨ãã« Seleniu
Selenium 㨠Ruby ã«ãããã¹ãã®èªååã§ãã£ãããå ¥åã®èªååãé²ãã¦ããã ã³ãã³ãã©ã¤ã³ããå®è¡ããã°ãããã¨ãã»ã¨ãã©ã§ããã©ã¦ã¶ã®GUIãèµ·åããªãã¦ãããã ãããã£ã¦ãGUI ãèµ·åããªã Google Chrome ã® Headless ã¢ã¼ãã使ã£ã Selenium ã¹ã¯ãªããã¸é 次移è¡ãã¦ãããã¨æãã åä½ã®è»½éåãã¡ãã£ã¨ã¯æå¾ ã§ããããã (æ¯è¼è¨æ¸¬ã¯ãã¦ããªã) 以ä¸ã¯ãé¢é£è¨äºã ãã©ã¦ã¶æä½ã®èªååï¼ selenium 㨠ruby â momota.txt seleniumãã¦ã㦠â momota.txt ç°å¢æ å ± ã½ããã¦ã§ã¢ ãã¼ã¸ã§ã³ OS Windows 10 Pro 1709 ãã©ã¦ã¶ Google Chrome 69.0.3497.100 ChromeDriver 2.39.562718 ruby 2.5.1p57 gem se
Webæè¡ã®æ¨æºãçå®ããWorld Wide Web Consortiumï¼W3Cï¼ã®Browser Testing and Toolsã¯ã¼ãã³ã°ã°ã«ã¼ãã¯ããWebDriverãã6æ5æ¥ä»ãã§å§åã«å°éãããã¨ãçºè¡¨ãã¾ããã WebDriverã¯ãWebãã©ã¦ã¶ãå¤é¨ããæä½ãããã¨ãå¯è½ã«ããWebã¢ããªã±ã¼ã·ã§ã³ã®ãã¹ããªã©ã®èªååãå®ç¾ããæè¡ã§ãã 主è¦ãªWebãã©ã¦ã¶ã«ã¯ãã§ã«ãã®WebDriverã®æ©è½ãç¨æããã¦ãã¾ããSeleniumã«ä»£è¡¨ãããWebãã©ã¦ã¶èªååã©ã¤ãã©ãªãå©ç¨ãããã¨ã§ãWebDriverãç¨ãã¦Webã¢ããªã±ã¼ã·ã§ã³ã®UIãã¹ããªã©ãèªååãããã¨ãå¯è½ã§ãã SeleniumããW3C㸠ãã¨ãã¨Webãã©ã¦ã¶ã«ã¯å¤é¨ããæä½ãè¡ãAPIãªã©ã¯ãªããWebãã¼ã¸ãWebã¢ããªã±ã¼ã·ã§ã³ãWebãã©ã¦ã¶ã§è¡¨ç¤ºããéã«ç»é¢ãæ£å¸¸ã«è¡¨ç¤ºããã¦ãã
const puppeteer = require('puppeteer'); const loginUrl = 'http://***/' // ãã¹ãããURL const pageTitle = 'React Test'; const id = 'takeda'; const pw = 'shinji'; const inputList = ['javascript', 'ruby', 'scala']; // ãã°ã¤ã³ç»é¢ã®æä½ async function phase1(page) { console.log('start phase1'); // ãã°ã¤ã³ãã¼ã¸ã«é·ç§»ãã await page.goto(loginUrl); // @TODO titleã®ã¢ãµã¼ã·ã§ã³ âpuppeteerã§ã¯ã¢ãµã¼ã·ã§ã³ã¯æªå®è£ await page.screenshot({ path: 'i
Seleniumã®è¨é²ã»åçãã¼ã«ã¨ããã°Selenium IDEãSelenium Builderãæåã§ããããããã®ãã¼ã«ã¯Firefox55以éåä½ããªããªã£ã¦ãã¾ããâ»1ãããã§Seleniumããã¸ã§ã¯ããã¼ã ã«ãã£ã¦æ°ãã¼ã¸ã§ã³ã®éçºãé²ããããå æ¥ã¤ãã«ãChromeã§åä½ããæ°ããSelenium IDEã®ãã¼ã¸ã§ã³1.0ããªãªã¼ã¹ããã¾ããã ä»æ¥ã¯ããã®æ°ããSelenium IDEãã¯ããã¨ãããç¡æã§ä½¿ããæ§ã ãªSeleniumã¹ã¯ãªããã®è¨é²ãã¼ã«ã«ã¤ãã¦ãç´¹ä»ãã¾ãã ãªããã®è¨äºã§ã¯ãããã°ã©ãã¼åãã«ããããã°ã©ãã³ã°è¨èªã«ããã¹ã¯ãªããä½æã®è£å©ãã¼ã«ãã¨ãã観ç¹ããå種ãã¼ã«ãæ¯è¼ãã¾ããããã°ã©ãã³ã°è¨èªã§ã¹ã¯ãªãããæ¸ãå ´åããã¹ã¯ãªããè¨é²ãã¼ã«ã¯ä¸è¨ã®ãããªç¨éã«æ´»ç¨ã§ããé常ã«ä¾¿å©ã§ãã ãã©ã¦ã¶ä¸ã®è¦ç´ ã®ãã±ã¼ã¿â»2 ãç°¡åã«åå¾ãã ãã¹
ããã¯Go Advent Calendar 2016ã®18æ¥ç®ã®è¨äºã§ããä»åã¯Goã§E2Eãã¹ããè¡ãããã®ã©ã¤ãã©ãªagoutiã«ã¤ãã¦æ¸ãã¾ãã Goã§E2Eãã¹ããæ¸ãçç± Webã¢ããªã±ã¼ã·ã§ã³ã®ãµã¼ãã¼ãµã¤ããGoã§æ¸ãã¦ããå ´åãGoã§E2Eãã¹ããæ¸ãã¡ãªããã¨ã㦠JavaScriptãå¾æã§ã¯ãªãã¨ã³ã¸ãã¢(èªå)ã§ãE2Eãã¹ããã¬ãªã¬ãªããã E2Eãã¹ãå®è¡æã®ã«ãã¬ãã¸ãåããï¼ãµã¼ãã¼ã®ã³ã¼ãã®ã©ããéã£ãããããã ãããã¨æã£ã¦ãããç¹ã«2çªãã®çç±ã大äºã§ããE2Eãã¹ããå ¨é¨åããçµæããµã¼ãã¼ã®ãã®é¨åã®ã³ã¼ãã¯éã£ã¦ãããã¨ãããã®ã¯ãã£ãã大ããªã¡ãªãããªã®ã§ã¯ãªããã¨ãã©ãããã¹ãããã¦ããã»ããªããææ¡ãããã¨ã§ããããã¯E2Eãã¹ãã ã¨é£ããããã¦ããããã¹ãã§ã«ãã¼ããããã¨ãããããªæ¦æ³ãåããããã¨æãã ãããå ·ä½çã«Goã§ã©ããã£
ãã©ã¦ã¶æä½ã®èªåå: Selenium 㨠Ruby ã§ãæ¸ãããã selenium ã便å©ããã¦ãæè¿ããã¹ã¯ãªãããæ¸ãããã«ãªã£ãã 以ä¸ã®ãããªãã¦ãã¦ãæºã¾ã£ã¦ããã®ã§ããããã§æ¾åºããã ã¦ã£ã³ãã¦ãµã¤ãºã®ãªãµã¤ãº ã¦ã£ã³ãã¦ä½ç½®ã®ç§»å ã¹ã¯ãªã¼ã³ã·ã§ããã®åå¾ è¦ç´ ã»ã¬ã¯ã¿ã¡ã½ããã®ä½¿ãåã ãããããã¦ã³ãªã¹ãã®é¸æ ãã¦ã¹ãªã¼ã (hover) ãã¬ã¼ã 移å ãããã¢ãããã¤ã¢ãã°ã®æ±ã ã³ã¼ãéãæ¸ããããã®ã¢ã³ãã¼ããã ããæ¡ãããã°ã©ã æ§é ã¤ã³ã¹ãã¼ã«æ¹æ³ãªã©ã¯ ãã©ã¦ã¶æä½ã®èªåå: Selenium 㨠Ruby ãåç §ã seleniumç¨ã¹ã¯ãªããéçºã®ãã¦ãã¦ã¨ããã¹ããã³ãã¨ãããã¹ããã¢ã¬ãªæãã ããçµå±ã ã¹ã¯ã¬ã¤ãã³ã°ã¨åæ§ã«HTMLæ§é ãç解ãããã¨ãå¿ è¦ãªã®ã§ãã©ã¦ã¶ä»å±ã®éçºãã¼ã«ã æé¢ããªãã Firefox éçºãã¼ã« chro
selenium 㨠ruby ã使ã£ã¦ãã©ã¦ã¶ GUI æä½ãèªååããã selenium ã¯ãWeb ã¢ããªã±ã¼ã·ã§ã³ã®èªåãã¹ãã®ããã®ãã¼ã«ã ã¬ã°ã¬ãã·ã§ã³ãã¹ãã«ãã使ããã¦ããããã ã selenium ã¯ããã©ã¦ã¶æä½ã·ããªãªãäºåã«è¨å®ãã¦ãã·ããªãªéãã«å®è¡ãã¦ãããã ã·ããªãªè¨å®ã¨ãã£ã¦ããFirefoxãã©ã°ã¤ã³ã® Selenium IDE ãªã©ã使ãã¨æä½ã è¨é²ãã¦ãããæ©è½ãããã®ã§ããã¾ã§å¤§å¤ã§ã¯ãªãã 詳細ã¯ãRuby ã¢ã½ã·ã¨ã¼ã·ã§ã³ â selenium ã® â1.2 ãã¹ãã®ä½æâ ããããåç §ãã¦ã»ãã selenium ã¯ãã¯ãã¹ãã©ã¦ã¶ã®ãã¼ã«ã§ãIE ã使ã£ã¦ IEéå®ã¿ãããªãµã¤ãã§ã使ããã IE ã Chrome ã§ä½¿ãã«ã¯å Selenium WebDriver ãå¿ è¦ã¨ãªãã ãã¹ãç¨ã¨è¨ãã¤ã¤ã使ãéã¯ããããã¨ããã 社å ã®
TRIDENTã§ã¯ã主ã«Seleniumãæ´»ç¨ãããã¹ãèªååæ¯æ´ãµã¼ãã¹ãæä¾ãã¦ãã¾ãããå®éã«Seleniumãå©ç¨ããä¸ã§æ¬¡ã®ãããªèª²é¡ãããã¨æãã¦ãã¾ããã ä¿å®æ§ã»æè»æ§ã®è¦³ç¹ãããããã°ã©ãã³ã°è¨èªã§ã¹ã¯ãªãããæ¸ããã¨ããå§ãããããããããªãã¨éããã°ã©ããã¹ã¯ãªãããã¨ã©ã¼å 容ãç解ãã«ãããªãã 1ã¹ããããã¨ããããã¯ã¨ã©ã¼çºçæã«ç»é¢ãã£ããã£ãåå¾ãããã¹ãçµæç»é¢ãã確èªã§ããããã«ããããã®ä½ãè¾¼ã¿ã¨è¨å®ãé¢åã ãã®èª²é¡ã解決ããSeleniumããã£ã¨ä½¿ãããããã®ã«ããããã«ãSahaginã¨ããHTMLã¬ãã¼ããã¼ã«ãä½ã£ã¦ãªã¼ãã³ã½ã¼ã¹ã§å ¬éãã¾ãããç¾å¨ãã¼ã¿çã§ãããä»æ¥ã¯ãã®æ©è½ã«ã¤ãã¦ç´¹ä»ãããã¨æãã¾ãã Part 2ã§ã¯ãã¤ã³ã¹ãã¼ã«&å©ç¨æ¹æ³(Java)ãQ&Aãæ¢ç¥ã®åé¡ãç´¹ä»ãã¾ãã Sahaginã§ã§ããã㨠Sahaginã
Seleniumã¨ã¯ãªã¼ãã³ã½ã¼ã¹ã®E2Eãã¹ããã¬ã¼ã ã¯ã¼ã¯ã§ã主ã«å®ãã©ã¦ã¶ãåããã¦Webãµã¤ãã®æ¤è¨¼ãè¡ãããã«ä½¿ãããã
ãªãã®ãã£ã¡ãã¨ããæãã§ãããå ·ä½çã«ãããããã¨ã¯ä»¥ä¸ã®éã Amazon ã® ã³ã³ãã³ãã¨ç«¯æ«ã®ç®¡ç ããè³¼å ¥ãã Kindle æ¸ç±ãèªåãã¦ã³ãã¼ã ä½æ ãããªãã¨ãããããã¨ããã¨ã Kindle æ¬ã¯ DRM ãã¯ã©ãã¯ãã確å®ãªæ段ãããã¾ãã DRM ãã¯ã©ãã¯ãããã¨ã¯éæ³ã§ããã Amazon ã¨ããä¼æ¥ãæ¶æ» ããæã«ãè³¼å ¥ããæ¬ãèªããªããªãã®ã¯å°ãã¾ãã Amazon ãæ¶æ» ããã¨ãã¯ä¸ç´æ«ã®ãããªç¤¾ä¼ã§ãããããã DRM ã®ã¯ã©ãã¯ç¨åº¦ã®ç¯ç½ªãåé¡ã«ãªããã¨ã¯ç¡ãã§ãããã AZW3 ããã¼ã«ã«ã«ä¿åãã¦ããã°ããã®æãããã° DRM ãã¯ã©ãã¯ããã°ããã¨ãããã¨ã«ãªãã¾ãã 以ä¸ã®èãã¯ååæ¬æ°ãååã¯ã¾ãã¹ã¯ã¬ã¤ãã³ã°ãã¥ããããªãã®ãããã°ãã£ã¦ã¿ãããã¨ããã ãã§ãã JavaScript ãå«ã¾ãªããã¼ã¸ã®ã¹ã¯ã¬ã¤ãã³ã°ã¯ã©ãã¨ã§ããªãã¾ãã Ja
ä»æ¥ã¯ã¹ã¯ã¬ã¤ãã³ã°ã®è©±ããã¾ãã ä»åã®ã¿ã¼ã²ããã¯ä¸è±æ±äº¬UFJãã¤ã¬ã¯ããéèæ©é¢ãã¦ã§ããµã¼ãã¹ãæä¾ããããã«ãªããéã«ã¾ã¤ããæ å ±ãé»ååãããããªãã¾ãããããããã API ãæä¾ãã¦ããããã§ã¯ãªãã®ã§ãç§ãã¡ã®ã»ãã§åå¾ã»å å·¥ããã¦ããå¿ è¦ãããã¾ããä»ãã¦ã§ããµã¤ãã§ããã°å½ç¶ã®ããã« JavaScript ã使ã£ã¦ãããããªã®ã§ããããã mechanizeãã¤ã¾ã HTML ã®è§£éããããªãããªã³ã¯ã®ã¯ãªãã¯ããã©ã¼ã ã®éä¿¡ãã·ã³ãã«ã«å®è£ ãããããªããæ¹ã§ã®ã¹ã¯ã¬ã¤ãã³ã°ã¯ãã§ã«ç¡ççã ã¨ããã¾ãã ãã¡ããä»æ¥ã«ããã¦ã¯ãã©ã¦ã¶ãªã¼ãã¡ã¼ã·ã§ã³ã¨ããæ¹æ³ããã§ã«ããã¾ãã®ã§ããããå©ç¨ãã¦ããã°ããªãã®æãããªãå®éã«äººéã使ããããªãã©ã¦ã¶ãããã°ã©ããã£ãã¯ã«æä½ãããã¨ãã§ãã¾ããç¾å¨ã¯ Selenium WebDriver ãããã¡ã¯ãã§ãããã使ç¨ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}