
{"id":7055,"date":"2024-04-26T18:57:50","date_gmt":"2024-04-26T09:57:50","guid":{"rendered":"https:\/\/techmania.jp\/blog\/?p=7055"},"modified":"2025-03-04T10:34:36","modified_gmt":"2025-03-04T01:34:36","slug":"webdriver","status":"publish","type":"post","link":"https:\/\/techmania.jp\/blog\/webdriver\/","title":{"rendered":"WebDriver\u3068\u306f\u30103\u5206\u3067\u308f\u304b\u308b\u3011\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u65b9\u6cd5\u3084\u57fa\u672c\u306e\u4f7f\u3044\u65b9\u3092\u89e3\u8aac"},"content":{"rendered":"<p>\u672c\u8a18\u4e8b\u3067\u306f\u521d\u5fc3\u8005\u5411\u3051\u306bWebDriver\u306e\u57fa\u790e\u77e5\u8b58\u3084\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u30fb\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n<h2 id=\"outline__1\" class=\"wp-block-heading\">Selenium WebDriver\u3068\u306f<\/h2>\n\n\n<p>Selenium\uff08\u30bb\u30ec\u30cb\u30a6\u30e0\uff09\u306f\u3001Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308a\u30012004\u5e74\u306b\u958b\u767a\u3055\u308c\u307e\u3057\u305f\u3002\u591a\u304f\u306e\u30d6\u30e9\u30a6\u30b6\u64cd\u4f5c\u3092\u5916\u90e8\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089\u76f4\u63a5\u5236\u5fa1\u3059\u308bAPI\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001Selenium WebDriver\u306f\u305d\u306e\u4e2d\u6838\u3092\u6210\u3059\u30c4\u30fc\u30eb\u3067\u3059\u3002\u300cSelenium1\uff08Selenium RC\uff09\u300d\u3068\u300cWebDriver\u300d\u3092\u7d71\u5408\u3059\u308b\u5f62\u3067Selenium 2.0\u306b\u5c0e\u5165\u3055\u308c\u30012011\u5e74\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\u3002\u305d\u306e\u305f\u3081\u300cSelenium2\u300d\u3068\u547c\u3070\u308c\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>Chrome\uff0fFirefox\uff0fInternet Explorer\uff0fOpera\uff0fAndroid\uff0fiOS\u306a\u3069\u306e\u30d6\u30e9\u30a6\u30b6\u306b\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001Java\uff0fC#\uff0fPython\uff0fRuby\u306a\u3069\u306e\u8a00\u8a9e\u304c\u5229\u7528\u3067\u304d\u307e\u3059\u3002Selenium WebDriver\u306b\u306f\u300cFirefoxDriver\u300d\u3084\u300cChromeDriver\u300d\u3068\u3044\u3063\u305f\u3001\u5404Web\u30d6\u30e9\u30a6\u30b6\u3092\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u3059\u308bAPI\u304c\u305d\u308c\u305e\u308c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u3066\u3001\u305d\u308c\u305e\u308c\u3092\u300cWebDriver\u300d\u3068\u3057\u307e\u3059\u3002Selenium\u306f\u307b\u304b\u306b\u3082\u30c6\u30b9\u30c8\u30b1\u30fc\u30b9\u3092\u8a18\u9332\u30fb\u518d\u751f\u3059\u308b\u30d6\u30e9\u30a6\u30b6\u62e1\u5f35\u6a5f\u80fd\u300cSelenium IDE\u300d\u3084\u30c6\u30b9\u30c8\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u8907\u6570\u306e\u30d6\u30e9\u30a6\u30b6\uff0fOS\u3067\u4e26\u884c\u3057\u3066\u5b9f\u884c\u3059\u308b\u300cSelenium Grid\u300d\u3068\u3044\u3063\u305f\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3092\u63d0\u4f9b\u3057\u3066\u304a\u308a\u3001\u305d\u308c\u305e\u308c\u7570\u306a\u308b\u30c6\u30b9\u30c8\u30cb\u30fc\u30ba\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<span style=\"color: #0000ff;\"><span style=\"color: #000000;\">\u3067\u5c0e\u5165\u3055\u308c\u307e\u3057\u305f\u3002<\/span><\/span><\/p>\n\n\n<h3 id=\"outline__1_1\" class=\"wp-block-heading\">Selenium1\u3068\u306e\u9055\u3044<\/h3>\n\n\n<p>Web\u30d6\u30e9\u30a6\u30b6\u3092\u81ea\u52d5\u3067\u64cd\u4f5c\u3059\u308b\u3068\u3044\u3046\u9762\u3067\u306f\u300cSelenium1\uff08Selenium RC\uff09\u300d\u3068\u540c\u3058\u3067\u3059\u304c\u3001Selenium WebDriver\u3067\u306f\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u62e1\u5f35\u6a5f\u80fd\u3084OS\u306e\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u30d6\u30e9\u30a6\u30b6\u3092\u64cd\u4f5c\u3067\u304d\u308b\u305f\u3081\u3001Selenium1\u306e\u3088\u3046\u306b\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u5236\u9650\u3092\u53d7\u3051\u305a\u306b\u6e08\u307f\u307e\u3059\u3002<\/p>\n\n\n<h3 id=\"outline__1_2\" class=\"wp-block-heading\">WebDriver\u306e\u4ed5\u7d44\u307f<\/h3>\n\n\n<p><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">Selenium\u306f\u3001Python\u3092\u306f\u3058\u3081\u3068\u3059\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u8a00\u8a9e\u3067\u5b9f\u884c\u3057\u307e\u3059\u3002\u4f8b\u3048\u3070\u3001Google Chrome\u3092\u958b\u304d\u305f\u3044\u5834\u5408\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u30d6\u30e9\u30a6\u30b6\u3092\u958b\u304f\u3088\u3046Selenium\u306b\u6307\u793a\u3059\u308c\u3070Selenium\u5074\u3067\u51e6\u7406\u3092\u884c\u3044\u3001Chrome\u7528\u306e\u30c9\u30e9\u30a4\u30d0\u30fc\u306b\u30d6\u30e9\u30a6\u30b6\u3092\u958b\u304f\u3088\u3046\u6307\u793a\u3092\u3057\u307e\u3059\u3002<\/span><\/span><\/p>\n\n\n<h3 id=\"outline__1_3\" class=\"wp-block-heading\">WebDriver\u3067\u3067\u304d\u308b\u3053\u3068<\/h3>\n\n\n<p>Selenium WebDriver\u306fWeb \u30da\u30fc\u30b8\u3078\u306e\u79fb\u52d5\u3084\u30e6\u30fc\u30b6\u5165\u529b\u3001JavaScript \u306e\u5b9f\u884c\u306a\u3069\u3001\u591a\u69d8\u306a\u6a5f\u80fd\u3092\u63d0\u4f9b\u3057\u307e<span style=\"color: #000000;\">\u3059\u3002Web\u753b\u9762\u64cd\u4f5c\u306e\u5b9f\u884c\u30c6\u30b9\u30c8\u3084\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u64ae\u5f71\u3001\u30d6\u30e9\u30a6\u30b6\u306b\u3088\u308b\u8868\u793a\u306e\u9055\u3044\u306e\u6bd4\u8f03\u306a\u3069\u3001<\/span><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">Web\u30a2\u30d7\u30ea\u958b\u767a\u306e\u5f79\u306b\u7acb\u3061\u307e\u3059\u3002<\/span><\/span><\/p>\n\n\n<div style=\"margin-top:4%;\"><a href=\"https:\/\/techmania.jp\/\"><p style=\"text-align:center; font-weight:bold; color:black; text-decoration:underline black;\">\u3042\u306a\u305f\u306e\u3054\u5e0c\u671b\u306b\u6cbf\u3063\u305f\u6848\u4ef6\u304c<span style=\"color: red;\">\u5fc5\u305a<\/span>\u898b\u3064\u304b\u308a\u307e\u3059<br>\u3010\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u5411\u3051\u3011<span style=\"color: red;\">\u9ad8\u53ce\u5165<\/span><span style=\"color: black;\">\u30fb<\/span><span style=\"color: blue;\">\u597d\u5f85\u9047<\/span><span style=\"color: black;\">\u306e\u6848\u4ef6\u3092\u3054\u7d39\u4ecb<\/span>\n<\/p><\/a>\n<\/div>\n\n<div style=\"text-align:center; margin-top:1%;\"><a href=\"https:\/\/techmania.jp\/\"><img decoding=\"async\" style=\"filter:drop-shadow(0px 0px 2px rgba(0,0,0,0.3));width:300px;\" alt=\"TECH MANIA \u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\" src=\"https:\/\/techmania.jp\/blog\/wp-content\/uploads\/2024\/02\/stop.png\"><\/a>\n<\/div>\n\n<div style=\"margin-top:0%;\"><a href=\"https:\/\/techmania.jp\/\">\n<p style=\"text-align:center; font-weight:bold; color:black; text-decoration:underline black;\">\u226b\u307e\u305a\u306f\u7c21\u5358<span style=\"color: blue;\">60<\/span>\u79d2\u3067<span style=\"color: red;\">\u7121\u6599\u304a\u554f\u3044\u5408\u308f\u305b<\/span>\u304b\u3089\u226a\n<\/p><\/a>\n<\/div>\n\n\n\n<h2 id=\"outline__2\" class=\"wp-block-heading\">WebDriver\u306e\u4e3b\u306a\u6d3b\u7528\u4f8b<\/h2>\n\n\n\n<h3 id=\"outline__2_1\" class=\"wp-block-heading\">Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8<\/h3>\n\n\n<p>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u306b\u304a\u3044\u3066\u3001\u6b63\u5e38\u306b\u52d5\u4f5c\u3059\u308b\u304b\u3092\u78ba\u8a8d\u3059\u308b\u30c6\u30b9\u30c8\u306f\u6b20\u304b\u305b\u307e\u305b\u3093\u3002Selenium WebDriver\u306f\u3001\u30c6\u30b9\u30c8\u5de5\u7a0b\u306e\u81ea\u52d5\u5316\u306b\u5229\u7528\u3055\u308c\u308b\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u3002\u30c6\u30b9\u30c8\u7d50\u679c\u306e\u6b63\u78ba\u6027\u3092\u4e0a\u3052\u308b\u6a5f\u80fd\u3082\u5229\u7528\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u30f3\u30b0\u30a2\u30d7\u30ea\u3068\u9023\u643a\u3059\u308c\u3070\u30c6\u30b9\u30c8\u7d50\u679c\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n<h3 id=\"outline__2_2\" class=\"wp-block-heading\">Web\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0<\/h3>\n\n\n<p><a href=\"https:\/\/techmania.jp\/blog\/python0003\/\" target=\"_blank\" rel=\"noopener\">Web\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0<\/a>\u3067\u3082\u3001Selenium WebDriver\u3092\u4f7f\u7528\u3057\u3066\u30c6\u30b9\u30c8\u3092\u884c\u3046\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3068\u306f\u3001\u4efb\u610f\u306eWeb\u30b5\u30a4\u30c8\u3084\u30d7\u30ed\u30b0\u30e9\u30e0\u306a\u3069\u304b\u3089\u5165\u624b\u3057\u305f\u30c7\u30fc\u30bf\u3092\u89e3\u6790\u3057\u3001\u4e0d\u8981\u306a\u90e8\u5206\u3092\u53d6\u308a\u9664\u3044\u3066\u7279\u5b9a\u306e\u60c5\u5831\u306e\u307f\u3092\u62bd\u51fa\u3057\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u3067\u51e6\u7406\u304c\u3057\u3084\u3059\u3044\u3088\u3046\u306b\u6574\u5f62\u3059\u308b\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u6280\u8853\u306e\u3053\u3068\u3067\u30c7\u30fc\u30bf\u5206\u6790\u3084\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002Selenium\u306f\u3001HTML\u3060\u3051\u3067\u306a\u304fJavaScript\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u3044\u308b\u305f\u3081\u52d5\u7684\u306a\u30da\u30fc\u30b8\u306eWeb\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u306b\u3082\u9069\u3057\u3066\u3044\u308b\u306e\u3067\u3059\u3002\u3053\u306e\u969b\u3001\u300cBeautiful Soup\u300d\u3084\u300cRequests\u300d\u306a\u3069\u306e\u307b\u304b\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3068\u7d44\u307f\u5408\u308f\u305b\u3066\u7528\u3044\u3089\u308c\u307e\u3059\u3002<\/p>\n\n\n<h2 id=\"outline__3\" class=\"wp-block-heading\">\u5229\u7528\u624b\u9806<\/h2>\n\n\n<p>\u672c\u8a18\u4e8b\u3067\u306fPython\u3067\u30d6\u30e9\u30a6\u30b6\u3092\u81ea\u52d5\u64cd\u4f5c\u3059\u308b\u624b\u9806\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n<h3 id=\"outline__3_1\" class=\"wp-block-heading\">Selenium\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n\n\n<p>\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><code>pip install selenium<\/code><\/pre>\n\n\n<p>\u6b21\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u308c\u3070\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><code>Installing collected packages: selenium\nSuccessfully installed selenium-(\u30d0\u30fc\u30b8\u30e7\u30f3)<\/code><\/pre>\n\n\n<p>pip\u306eupgrade\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u3001\u4e0b\u8a18\u30b3\u30de\u30f3\u30c9\u3067pip\u3092\u66f4\u65b0\u3057\u3066\u304b\u3089\u518d\u5ea6\u5b9f\u884c\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><code>pip install --upgrade pip<\/code><\/pre>\n\n\n\n<h3 id=\"outline__3_2\" class=\"wp-block-heading\">WebDriver\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n\n\n\n<h4 id=\"outline__3_2_1\" class=\"wp-block-heading\">\u73fe\u5728\u306e\u30d6\u30e9\u30a6\u30b6\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d<\/h4>\n\n\n<p>Web\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30d6\u30e9\u30a6\u30b6\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u5408\u308f\u305b\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u30d6\u30e9\u30a6\u30b6\u3054\u3068\u306e\u78ba\u8a8d\u65b9\u6cd5\u3092\u4ee5\u4e0b\u306b\u793a\u3057\u307e\u3059\u3002<\/p>\n\n\n<h5 class=\"wp-block-heading\">\u5bfe\u5fdc\u3059\u308b\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u8abf\u3079\u65b9<\/h5>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>\u30d6\u30e9\u30a6\u30b6<\/strong><\/td><td><strong>\u30d0\u30fc\u30b8\u30e7\u30f3\u306e\u78ba\u8a8d\u624b\u9806<\/strong><\/td><\/tr><tr><td>Google Chrome<\/td><td>\u30d6\u30e9\u30a6\u30b6\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u306b\u5bfe\u5fdc<br>\uff08\u30d6\u30e9\u30a6\u30b6\u304c114.0.xxx\u3067\u3042\u308c\u3070\u30c9\u30e9\u30a4\u30d0\u30fc\u306f114.0.xxx\uff09<\/td><\/tr><tr><td>Microsoft Edge<\/td><td>\u30d6\u30e9\u30a6\u30b6\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u306b\u5bfe\u5fdc<\/td><\/tr><tr><td>Firefox<\/td><td>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30da\u30fc\u30b8\u306e\u30ea\u30ea\u30fc\u30b9\u30ce\u30fc\u30c8\u306b\u8a18\u8f09\u3055\u308c\u3066\u3044\u308b<br>\uff08Firefox version is xxx\uff09<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">\u73fe\u5728\u306eChrome\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b<\/h5>\n\n\n<p>Chrome\u306e\u5834\u5408\u3001\u30d6\u30e9\u30a6\u30b6\u306e\u53f3\u4e0a\u306e3\u70b9\u30de\u30fc\u30af\uff1e\u30d8\u30eb\u30d7\uff1e\u300cGoogle Chrome\u306b\u3064\u3044\u3066\u300d \u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/wd1.png\" class=\"post-img\">\n\n\n\n<h5 class=\"wp-block-heading\">\u3010\u30d1\u30b9\u3092\u901a\u3057\u3066\u3044\u308b\u5834\u5408\u3011\u73fe\u5728\u306eChromeDriver\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b<\/h5>\n\n\n\n<h6 class=\"wp-block-heading\">chromedriver\u306e\u5834\u6240\u3092\u78ba\u8a8d\u3059\u308b<\/h6>\n\n\n<p>ChromeDriver\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u78ba\u8a8d\u3059\u308b\u306b\u306f\u3001ChromeDriver\u306e\u3042\u308b\u5834\u6240\u3092\u78ba\u8a8d\u3057\u307e\u3059\u3002\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u8d77\u52d5\u3057\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><code>where chromedriver<\/code><\/pre>\n\n\n<p>\u30d1\u30b9\u304c\u901a\u3063\u3066\u3044\u308b\u3068Chromedriver\u306e\u30d1\u30b9\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n<h6 class=\"wp-block-heading\">chromedriver\u306e\u3042\u308b\u5834\u6240\u306b\u79fb\u52d5\u3059\u308b<\/h6>\n\n\n<p>\u305d\u306e\u3046\u3061\u3001\u300c\\chromedriver.exe\u300d\u3092\u7701\u304f\u90e8\u5206\u3092\u30b3\u30d4\u30fc\u3057\u307e\u3059\u3002\u30ab\u30fc\u30bd\u30eb\u3092\u5f53\u3066\u305f\u72b6\u614b\u3067[Enter]\u30ad\u30fc\u3092\u62bc\u3059\u3053\u3068\u3067\u30b3\u30d4\u30fc\u3067\u304d\u307e\u3059\u3002\u307e\u305f\u3001\u53f3\u30af\u30ea\u30c3\u30af\u3059\u308c\u3070\u30b3\u30d4\u30fc\u5185\u5bb9\u3092\u30da\u30fc\u30b9\u30c8\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>cd where\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u7d50\u679c\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>\uff08\u4f8b\uff09cd C:\\Program Files\\selenium<\/code><\/pre>\n\n\n\n<h6 class=\"wp-block-heading\">chromedriver\u3092\u8d77\u52d5\u3059\u308b<\/h6>\n\n\n<p>\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067Chromedriver\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><code>chromedriver.exe<\/code><\/pre>\n\n\n<p>\u203b\u30d1\u30b9\u3092\u901a\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u3053\u306e\u65b9\u6cd5\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n<h4 id=\"outline__3_2_2\" class=\"wp-block-heading\">\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Chrome Driver\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h5>\n\n\n\n<h6 class=\"wp-block-heading\">\u3010\u65b9\u6cd5\uff11\u3011ChromeDriver\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b<\/h6>\n\n\n<p>ChromeDriver\u306f\u3001Google\u793e\u304c\u63d0\u4f9b\u3059\u308b\u30c9\u30e9\u30a4\u30d0\u30fc\u3067\u3059\u3002<\/p>\n<p><span style=\"color: #0000ff;\"><span style=\"color: #000000;\"><a href=\"https:\/\/chromedriver.chromium.org\/downloads\" target=\"_blank\" rel=\"noopener\">\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u30da\u30fc\u30b8<\/a>\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u5b8c\u5168\u306b\u4e00\u81f4\u3057\u3066\u306a\u3044\u5834\u5408\u306f\u3001Chrome\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3088\u308a\u6570\u5024\u304c\u5c0f\u3055\u3044\u3082\u306e\u306e\u4e2d\u3067\u6700\u65b0\u306e\u3082\u306e\u3092\u9078\u3073\u307e\u3057\u3087\u3046\u3002<\/span><\/span><\/p>\n\n\n<h6 class=\"wp-block-heading\">\u3010\u65b9\u6cd52\u3011chromedriver-binary\u3092\u5229\u7528\u3059\u308b\u5834\u5408<\/h6>\n\n\n<p><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">chromedriver-binary\u306f\u3001\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u88fd\u54c1\u3067\u3001\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3068\u30d1\u30b9\u3092\u901a\u3059\u8a2d\u5b9a\u3082\u3057\u3066\u304f\u308c\u307e\u3059\u3002\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u304b\u3089pip\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3092\u3057\u307e\u3059\u3002\u76ee\u7684\u306b\u5fdc\u3058\u3066\u9069\u3057\u305f\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3057\u3087\u3046\u3002<\/span><\/span><\/p>\n<p><strong><span style=\"color: #000000;\">\u6700\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5834\u5408<\/span><\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>pip install chromedriver-binary<\/code><\/pre>\n\n\n<p><strong><span style=\"color: #000000;\">Chrome\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u81ea\u52d5\u3067\u5408\u308f\u305b\u308b\u5834\u5408<\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">Chrome\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306b\u5bfe\u5fdc\u3059\u308b\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u81ea\u52d5\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n<pre class=\"wp-block-code\"><code>pip install chromedriver-binary-auto<\/code><\/pre>\n\n\n<p><span style=\"color: #000000;\"><strong>\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5834\u5408<\/strong><\/span><\/p>\n<p>\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u6307\u5b9a\u3059\u308b\u5834\u5408\u306f\u30d0\u30fc\u30b8\u30e7\u30f3\u756a\u53f7\u3092\u660e\u8a18\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><code>pip install chromedriver-binary == \u30d0\u30fc\u30b8\u30e7\u30f3<\/code><\/pre>\n\n\n<p>2\u7a2e\u985e\u306e\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u521d\u5fc3\u8005\u306fchromedriver-binary\u3092\u4f7f\u3046\u65b9\u6cd5\u304c\u304a\u3059\u3059\u3081\u3067\u3059\u3002\u3053\u306e\u65b9\u6cd5\u3067\u306f\u300c\u9069\u5207\u306a\u5834\u6240\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u914d\u7f6e\u3059\u308b\u300d\u624b\u9806\u304c\u4e0d\u8981\u306b\u306a\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n\n\n<h5 class=\"wp-block-heading\">Microsoft Edge WebDriver\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h5>\n\n\n<p><a href=\"https:\/\/developer.microsoft.com\/en-us\/microsoft-edge\/tools\/webdriver\/\" target=\"_blank\" rel=\"noopener\">\u516c\u5f0f\u30da\u30fc\u30b8<\/a>\u304b\u3089\u81ea\u8eab\u306e\u74b0\u5883\u306b\u5fdc\u3058\u305f\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u9078\u629e\u3057\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002PC\u306e\u30b9\u30da\u30c3\u30af\u306f\u30b9\u30bf\u30fc\u30c8\uff1e\u8a2d\u5b9a\uff1e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001Microsoft Edge\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u306fEdge\u3092\u8d77\u52d5\u3057\u3066\u53f3\u4e0a\u306e\u300c\u2026\u300d\u3092\u30af\u30ea\u30c3\u30af\u3057\u3001\u30d8\u30eb\u30d7\u3068\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\uff1eMicrosoft Edge \u306b\u3064\u3044\u3066 \u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Edge \u306e WebDriver \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u30fc\u306f\u8907\u6570\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u3042\u308a\u307e\u3059\u304c\u3001\u57fa\u672c\u7684\u306b\u306f\u6700\u65b0\u7248\u306e Stable Channel \u3092\u9078\u3093\u3067\u304a\u3051\u3070\u5927\u4e08\u592b\u3067\u3059\u3002<\/p>\n\n\n<h5 class=\"wp-block-heading\">Firefox Driver\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h5>\n\n\n<p><a href=\"https:\/\/github.com\/mozilla\/geckodriver\/releases\" target=\"_blank\" rel=\"noopener\">\u516c\u5f0f\u30da\u30fc\u30b8<\/a>\u304b\u3089\u81ea\u8eab\u306e\u74b0\u5883\u306b\u5fdc\u3058\u305f\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u9078\u629e\u3057\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002PC\u306e\u30b9\u30da\u30c3\u30af\u306f\u30b9\u30bf\u30fc\u30c8\uff1e\u8a2d\u5b9a\uff1e\u30d0\u30fc\u30b8\u30e7\u30f3\u60c5\u5831\u3067\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n<h4 id=\"outline__3_2_3\" class=\"wp-block-heading\">\u9069\u5207\u306a\u5834\u6240\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30e9\u3092\u914d\u7f6e\u3059\u308b<\/h4>\n\n\n<p>\u203bchromedriver-binary\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5834\u5408\u306f\u4e0d\u8981<\/p>\n<p>ChromeDriver\u306e\u7f6e\u304f\u5834\u6240\u306f\u3069\u3053\u3067\u3082\u304b\u307e\u3044\u307e\u305b\u3093\u304c\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u5897\u3048\u305f\u5834\u5408\u306b\u3057\u3063\u304b\u308a\u7ba1\u7406\u3067\u304d\u3066\u3044\u306a\u3044\u3068\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u4f4d\u7f6e\u3092\u628a\u63e1\u3057\u305a\u3089\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u9069\u3057\u305f\u4f4d\u7f6e\u306b\u914d\u7f6e\u3059\u308b\u306e\u304c\u671b\u307e\u3057\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n<h5 class=\"wp-block-heading\">\u30b7\u30b9\u30c6\u30e0\u5168\u4f53\u3067\u540c\u3058\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u4f7f\u3046\u5834\u5408<\/h5>\n\n\n<p>Python\u304b\u3089Selenium WebDriver\u3067\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u8d77\u52d5\u3059\u308b\u5834\u5408\u3001\u30d1\u30b9\u304c\u901a\u308b\u5834\u6240\u306b\u683c\u7d0d\u3059\u308c\u3070\u30b3\u30fc\u30c9\u5185\u3067\u30d1\u30b9\u3092\u660e\u8a18\u3057\u306a\u304f\u3066\u3082\u554f\u984c\u3042\u308a<span style=\"color: #000000;\">\u307e\u305b\u3093\u3002\u30b7\u30b9\u30c6\u30e0\u306e\u30d1\u30b9\u74b0\u5883\u5909\u6570\u306b\u542b\u307e\u308c\u308b\u5834\u6240\u306b\u7f6e\u3051\u3070\u5b9f\u884c\u6642\u306b\u30d1\u30b9\u3092\u8a18\u8f09\u3057\u306a\u304f\u3066\u6e08\u307f\u307e\u3059\u3002<\/span>\u300cC:\\Windows\u300d\u300cC:\\Windows\\system32\uff08\u307e\u305f\u306f64\uff09\u300d\u300cC:\\Windows\\System32\uff08\u307e\u305f\u306f64\uff09\\Wbem\u300d\u306e\u3044\u305a\u308c\u304b\u306b\u7f6e\u304d\u307e\u3057\u3087\u3046\u3002\u3053\u306e\u5834\u5408\u3001\u30bd\u30fc\u30b9\u5185\u3067\u30d1\u30b9\u3092\u901a\u3059\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u914d\u7f6e\u7b87\u6240\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n\n\n<h5 class=\"wp-block-heading\">\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3054\u3068\u306b\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5909\u3048\u308b\u5834\u5408<\/h5>\n\n\n<p>Python\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3068\u540c\u3058\u30d5\u30a9\u30eb\u30c0\u306b\u683c\u7d0d\u3057\u3066\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u5225\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u4f7f\u7528\u3059\u308b\u5834\u5408\u306f\u30b3\u30fc\u30c9\u5185\u3067\u30d1\u30b9\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<div class=\"exclamationBox\">\n<p>\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u7f6e\u304d\u63db\u3048\u308b\u5834\u5408\u306f\u5fc5\u305a\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u6b62\u3081\u3066\u304b\u3089\u914d\u7f6e\u3057\u307e\u3057\u3087\u3046\u3002\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u884c\u4e2d\u306f\u914d\u7f6e\u3067\u304d\u306a\u3044\u3053\u3068\u306b\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<\/p>\n<\/div>\n\n\n<h3 id=\"outline__3_3\" class=\"wp-block-heading\">\u30d6\u30e9\u30a6\u30b6\u3092\u64cd\u4f5c\u3059\u308b\u30b3\u30fc\u30c9\u306e\u4f5c\u6210<\/h3>\n\n\n<p><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">\u30d6\u30e9\u30a6\u30b6\u3092\u64cd\u4f5c\u3059\u308b\u30b3\u30fc\u30c9\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002\u30b3\u30fc\u30c9\u4f5c\u6210\u306b\u306fVisual Studio\u306a\u3069\u306eIDE\u3084VSCode\u306a\u3069\u306e\u30a8\u30c7\u30a3\u30bf\u3092\u4f7f\u7528\u3057\u307e\u3057\u3087\u3046\u3002\u306a\u304a\u3001\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306fGoogle\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3092\u958b\u304d\u30015\u79d2\u5f8c\u306b\u30d6\u30e9\u30a6\u30b6\u3092\u9589\u3058\u308b\u5834\u5408\u306ePython\u30b3\u30fc\u30c9\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/span><\/span><\/p>\n\n\n<h4 id=\"outline__3_3_1\" class=\"wp-block-heading\">Chrome\u3092\u81ea\u52d5\u64cd\u4f5c\u3059\u308b\u5834\u5408<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>from selenium import webdriver\nimport time\n\ndriver = webdriver.Chrome()\ndriver.get('https:\/\/www.google.com\/?hl=ja')\ntime.sleep(5)\n\ndriver.close()<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">\uff08chromedriver-binary\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u305f\u5834\u5408\uff09<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>from selenium import webdriver\n<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-red-color\">import chromedriver_binary<\/mark>\nimport time\n\ndriver = webdriver.Chrome()\ndriver.get('https:\/\/www.google.com\/?hl=ja')\ntime.sleep(5)\n\ndriver.close()<\/code><\/pre>\n\n\n\n<h4 id=\"outline__3_3_2\" class=\"wp-block-heading\">Edge\u3092\u81ea\u52d5\u64cd\u4f5c\u3059\u308b\u5834\u5408<\/h4>\n\n\n<p>driver\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u306e\u90e8\u5206\u3092\u4e0b\u8a18\u30b3\u30fc\u30c9\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver = webdriver.Edge()<\/code><\/pre>\n\n\n\n<h4 id=\"outline__3_3_3\" class=\"wp-block-heading\">Firefox\u3092\u81ea\u52d5\u64cd\u4f5c\u3059\u308b\u5834\u5408<\/h4>\n\n\n<p>driver\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u306e\u90e8\u5206\u3092\u4e0b\u8a18\u30b3\u30fc\u30c9\u306b\u5909\u66f4\u3057\u307e\u3059\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver = webdriver.Firefox()<\/code><\/pre>\n\n\n\n<h2 id=\"outline__4\" class=\"wp-block-heading\">\u6ce8\u610f\u70b9<\/h2>\n\n\n\n<h3 id=\"outline__4_1\" class=\"wp-block-heading\">\u30d6\u30e9\u30a6\u30b6\u3054\u3068\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u5fc5\u8981<\/h3>\n\n\n<p><span style=\"color: #000000;\">WebDriver\u81ea\u4f53\u306f\u30af\u30ed\u30b9\u30d6\u30e9\u30a6\u30b6\u5bfe\u5fdc\u306e\u6280\u8853\u3067\u3059\u304c\u3001Chrome\u3067\u3042\u308c\u3070chromedriver\u3068\u3044\u3046\u3088\u3046\u306b\u3001\u30d6\u30e9\u30a6\u30b6\u3054\u3068\u306bWebDriver\u3092\u6271\u3046\u305f\u3081\u306e\u5c02\u7528\u306e\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n\n\n<h3 id=\"outline__4_2\" class=\"wp-block-heading\">\u5b9a\u671f\u7684\u306a\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u66f4\u65b0\u304c\u5fc5\u8981<\/h3>\n\n\n<p><span style=\"color: #000000;\">\u30d6\u30e9\u30a6\u30b6\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u65e5\u3005\u66f4\u65b0\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u30c9\u30e9\u30a4\u30d0\u30fc\u3082\u305d\u308c\u306b\u5408\u308f\u305b\u3066\u66f4\u65b0\u3057\u307e\u3057\u3087\u3046\u3002\u30d6\u30e9\u30a6\u30b6\u3068\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u7570\u306a\u3063\u3066\u3044\u308b\u5834\u5408\u3001\u30a8\u30e9\u30fc\u304c\u51fa\u3066Selenium WebDriver\u304c\u5b9f\u884c\u3067\u304d\u306a\u3044\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/span><\/p>\n\n\n<h2 id=\"outline__5\" class=\"wp-block-heading\">Selenium WebDriver\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/h2>\n\n\n<p><span style=\"color: #000000;\">\u4e0b\u8a18\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30da\u3057\u3066\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002\u3053\u308c\u306fGoogle\u306e\u30c8\u30c3\u30d7\u30da\u30fc\u30b8\u3092\u958b\u304d\u30015\u79d2\u5f8c\u306b\u30d6\u30e9\u30a6\u30b6\u3092\u9589\u3058\u308bPython\u30b3\u30fc\u30c9\u3067\u3059\u3002<\/span><\/p>\n<p><strong>\u3010\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3011<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>from selenium import webdriver\nimport time\n\ndriver = webdriver.Chrome()\ndriver.get('https:\/\/www.google.com\/?hl=ja')\ntime.sleep(5)\n\ndriver.close()<\/code><\/pre>\n\n\n<p><span style=\"color: #000000;\">\u30d6\u30e9\u30a6\u30b6\u304c\u81ea\u52d5\u3067\u958b\u3044\u30665\u79d2\u5f8c\u306b\u9589\u3058\u3066\u3044\u308c\u3070\u6210\u529f\u3067\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">Selenium WebDriver\u3067\u30d6\u30e9\u30a6\u30b6\u3092\u958b\u304f\u3068\u3001\u30ed\u30b0\u30a2\u30a6\u30c8\u72b6\u614b\u3067\u30d6\u30e9\u30a6\u30b6\u304c\u8d77\u52d5\u3057\u3001\u300cChrome\u306f\u81ea\u52d5\u30c6\u30b9\u30c8 \u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306b\u3088\u3063\u3066\u5236\u5fa1\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u300d\u3068\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/span><\/p>\n<p>\u3082\u3057\u3001\u6b21\u306e\u3088\u3046\u306b\u8868\u793a\u3055\u308c\u305f\u5834\u5408\u306f<\/p>\n\n\n<pre class=\"wp-block-code\"><code>\u2018chromedriver\u2019 executable needs to be in PATH<\/code><\/pre>\n\n\n<p>ChromeDriver\u306e\u5834\u6240\u3092\u660e\u793a\u3057\u3066\u5b9f\u884c\u3057\u307e\u3059\u3002<\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver = webdriver.Chrome(r'C:\\Users\\\uff5e\uff5e\uff5e\\chromedriver')<\/code><\/pre>\n\n\n<p>\u203b\u300cr&#8217;&#8230;&#8217;\u300d\u306fPython\u3067\u30d1\u30b9\u3092\u30a8\u30b9\u30b1\u30fc\u30d7\u305b\u305a\u306b\u8a18\u8ff0\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002\u30af\u30a9\u30fc\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u4e2d\u8eab\u304c&#8221;raw\u6587\u5b57\u5217&#8221;\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\u3002<\/p>\n<p><span style=\"color: #000000;\">\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3054\u3068\u306b\u30c9\u30e9\u30a4\u30d0\u30fc\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3092\u5206\u3051\u3066\u3044\u308b\u5834\u5408\u306f\u307b\u304b\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u5185\u306e\u30c9\u30e9\u30a4\u30d0\u30fc\u3092\u8a8d\u8b58\u3057\u3066\u3057\u307e\u308f\u306a\u3044\u3088\u3046\u660e\u793a\u3059\u308b\u306e\u304c\u3044\u3044\u3067\u3057\u3087\u3046\u3002<\/span><\/p>\n\n\n<h2 id=\"outline__6\" class=\"wp-block-heading\">\u4e3b\u8981\u306a\u30e1\u30bd\u30c3\u30c9\u3010\u4e00\u89a7\u3011<\/h2>\n\n\n<p><span style=\"color: #000000;\">Selenium WebDriver\u3067\u3088\u304f\u4f7f\u7528\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3092\u4e00\u89a7\u3067\u307e\u3068\u3081\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u672c\u8a18\u4e8b\u3067\u306fPython\u3067\u306e\u8a18\u8ff0\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u304c\u3001\u8a18\u8ff0\u3059\u308b\u8a00\u8a9e\u306b\u3088\u3063\u3066\u66f8\u304d\u65b9\u306f\u7570\u306a\u308b\u306e\u3067\u6ce8\u610f\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/span><\/p>\n<p><strong>\u25bc\u30d6\u30e9\u30a6\u30b6\u3092\u8d77\u52d5\u3059\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver = webdriver.xxx()<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>\u30d6\u30e9\u30a6\u30b6<\/strong><\/td><td><strong>\u30e1\u30bd\u30c3\u30c9<\/strong><\/td><\/tr><tr><td>Google Chrome<\/td><td>webdriver.Chrome()<\/td><\/tr><tr><td>Edge<\/td><td>webdriver.Edge()<\/td><\/tr><tr><td>Firefox<\/td><td>webdriver.Firefox()<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<p><strong>\u25bc\u6307\u5b9a\u306eURL\u306b\u9077\u79fb\u3059\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.get('URL')<\/code><\/pre>\n\n\n<p><strong>\u25bc\u4e00\u3064\u524d\u306b\u623b\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.back()<\/code><\/pre>\n\n\n<p><strong>\u25bc\u4e00\u3064\u5148\u306b\u9032\u3080<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.forward()<\/code><\/pre>\n\n\n<p><strong>\u25bc\u30d6\u30e9\u30a6\u30b6\u3092\u66f4\u65b0\u3059\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.refresh()<\/code><\/pre>\n\n\n<p><strong>\u25bc\u73fe\u5728\u306eURL\u3092\u8868\u793a\u3059\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.current_url<\/code><\/pre>\n\n\n<p><strong>\u25bc\u30bd\u30fc\u30b9\u3092\u53d6\u5f97\u3059\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.page_source<\/code><\/pre>\n\n\n<p><strong>\u25bc\u8981\u7d20\u3092\u53d6\u5f97\u3059\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.find_element_by_class_name(\"classname\") #class\u3067\u6307\u5b9a\ndriver.find_element_by_id(\"id\") #id\u3067\u6307\u5b9a\ndriver.find_element_by_xpath(\"xpath\") #xpath\u3067\u6307\u5b9a\u3000\u5358\u6570\ndriver.find_element_by_xpaths(\"xpath\") #xpath\u3067\u6307\u5b9a\u3000\u8907\u6570<\/code><\/pre>\n\n\n<p><strong>\u25bc\u8981\u7d20\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.find_element_by_xpath(\"XPATH\").click()<\/code><\/pre>\n\n\n<p><strong>\u25bc\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u3092\u64ae\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.save_screenshot(\u2018C:\\test\\screenshot.png\u2019)\u3000#\u62e1\u5f35\u5b50\u306f.png\u3001\u30d5\u30eb\u30d1\u30b9\u3067\u6307\u5b9a\u3059\u308b<\/code><\/pre>\n\n\n<p><strong>\u25bc\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.execute_script(\u2018window.scrollBy(x, y);\u2019) #\u30d4\u30af\u30bb\u30eb\u3067\u6307\u5b9a\u3059\u308b<\/code><\/pre>\n\n\n<p>\uff08\u4f8b\uff09<\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.execute_script('window.scrollBy(0, 100);')\u3000#\u5782\u76f4\u65b9\u5411\u306b100\u30d4\u30af\u30bb\u30eb\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b\ndriver.execute_script('window.scrollTo(0, document.body.scrollHeight);')\u3000#\u6700\u4e0b\u90e8\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3059\u308b<\/code><\/pre>\n\n\n<p><strong>\u25bc\u5168\u753b\u9762\u8868\u793a\u306b\u3059\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.maximize_window()<\/code><\/pre>\n\n\n<p><strong>\u25bc\u73fe\u5728\u306e\u30d6\u30e9\u30a6\u30b6\u3092\u9589\u3058\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.close()<\/code><\/pre>\n\n\n<p><strong>\u25bc\u3059\u3079\u3066\u306e\u30d6\u30e9\u30a6\u30b6\u3092\u9589\u3058\u308b<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\"><code>driver.quit()<\/code><\/pre>\n\n\n\n<h2 id=\"outline__7\" class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n<p><span style=\"color: #0000ff;\"><span style=\"color: #000000;\">Selenium\u306f\u3082\u3068\u3082\u3068UI\u30c6\u30b9\u30c8\u3092\u81ea\u52d5\u5316\u3059\u308b\u306e\u3092\u76ee\u7684\u3068\u3057\u3066\u958b\u767a\u3055\u308c\u307e\u3057\u305f\u304c\u3001\u73fe\u5728\u306f\u305d\u308c\u3060\u3051\u3067\u306a\u304f\u3001Web\u30b9\u30af\u30ec\u30a4\u30d4\u30f3\u30b0\u3084\u7e70<\/span><\/span>\u308a\u8fd4\u3057\u4f5c\u696d\u306e\u52b9\u7387\u5316\u306a\u3069\u3001\u5e45\u5e83\u3044\u7528\u9014\u3067\u5229\u7528\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u6628\u4eca\u306fPower Automate\u306a\u3069\u306eRPA\u30c4\u30fc\u30eb\u3067\u81ea\u52d5\u5316\u3059\u308b\u3053\u3068\u3082\u591a\u3044\u3067\u3059\u304c\u3001\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u306b\u306fSelenium\u304c\u9069\u3057\u3066\u3044\u307e\u3059\u3002RPA\u30c4\u30fc\u30eb\u306f\u6709\u6599\u306e\u3082\u306e\u304c\u591a\u3044\u3067\u3059\u304c\u3001Selenium\u306f\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u3042\u308b\u305f\u3081\u7121\u6599\u3067\u30cd\u30c3\u30c8\u4e0a\u306b\u306f\u8c4a\u5bcc\u306b\u60c5\u5831\u304c\u3042\u308a\u3001\u521d\u5fc3\u8005\u3067\u3082\u5b89\u5fc3\u3057\u3066\u5b66\u7fd2\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n<h2 id=\"outline__8\" class=\"wp-block-heading\">IT\u30b9\u30ad\u30eb\u306e\u7fd2\u5f97\u65b9\u6cd5\u306f\uff1f<\/h2>\n\n\n<p>\u66f8\u7c4d\u3084\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u3067\u5b66\u7fd2\u3059\u308b\u65b9\u6cd5\u304c\u3042\u308a\u307e\u3059\u3002\u6628\u4eca\u3067\u306f\u3001YouTube\u306a\u3069\u306e\u52d5\u753b\u30b5\u30a4\u30c8\u3084\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u30b5\u30a4\u30c8\u306a\u3069\u3082\u5145\u5b9f\u3057\u3066\u3044\u3066\u591a\u304f\u306e\u60c5\u5831\u304c\u624b\u306b\u5165\u308a\u307e\u3059\u3002<br \/>\u305d\u3057\u3066\u3001\u3088\u308a\u52b9\u7387\u7684\u306b\u77e5\u8b58\u30fb\u30b9\u30ad\u30eb\u3092\u7fd2\u5f97\u3059\u308b\u306b\u306f\u3001\u77e5\u8b58\u3092\u3064\u3051\u306a\u304c\u3089\u5b9f\u969b\u306b\u624b\u3092\u52d5\u304b\u3057\u3066\u307f\u308b\u306a\u3069\u3001\u30a4\u30f3\u30d7\u30c3\u30c8\u3068\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\u3092\u7e70\u308a\u8fd4\u3057\u3066\u3044\u304f\u3053\u3068\u304c\u91cd\u8981\u3067\u3059\u3002\u7279\u306b\u72ec\u5b66\u306e\u5834\u5408\u306f\u3001\u6709\u8b58\u8005\u306b\u8cea\u554f\u304c\u3067\u304d\u305f\u308a\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af\u3092\u3082\u3089\u3048\u308b\u3088\u3046\u306a\u74b0\u5883\u304c\u3042\u308b\u3068\u3001\u7406\u89e3\u5ea6\u304c\u6df1\u307e\u308b\u3067\u3057\u3087\u3046\u3002<\/p>\n<p>\u305f\u3060\u3001IT\u30b9\u30ad\u30eb\u3092\u8eab\u306b\u3064\u3051\u308b\u969b\u3001\u3069\u3046\u3057\u3066\u3082\u8ab2\u984c\u306b\u3076\u3064\u304b\u3063\u3066\u3057\u307e\u3046\u3053\u3068\u306f\u3042\u308a\u307e\u3059\u3088\u306d\u3002\u7279\u306b\u72ec\u5b66\u3060\u3068\u3001\u308f\u304b\u3089\u306a\u3044\u90e8\u5206\u3092\u30d7\u30ed\u306b\u8cea\u554f\u3067\u304d\u308b\u6a5f\u4f1a\u3092\u78ba\u4fdd\u3057\u306b\u304f\u304f\u3001\u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3\u304c\u7d9a\u304d\u306b\u304f\u3044\u3068\u3044\u3046\u5074\u9762\u304c\u3042\u308a\u307e\u3059\u3002\u72ec\u5b66\u3067\u30e2\u30c1\u30d9\u30fc\u30b7\u30e7\u30f3\u3092\u7dad\u6301\u3059\u308b\u81ea\u4fe1\u304c\u306a\u3044\u4eba\u306b\u306f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3068\u3044\u3046\u624b\u3082\u3042\u308a\u307e\u3059\u3002\u8cbb\u7528\u306f\u639b\u304b\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u5206\u30b9\u30ad\u30eb\u3092\u8eab\u306b\u3064\u3051\u3084\u3059\u3044\u3067\u3059\u3002\u3057\u3063\u304b\u308a\u3068\u77e5\u8b58\u30fb\u30b9\u30ad\u30eb\u3092\u7fd2\u5f97\u3057\u3066\u5b9f\u8df5\u306b\u6d3b\u304b\u3057\u305f\u3044\u3068\u3044\u3046\u4eba\u306f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u304c\u304a\u3059\u3059\u3081\u3067\u3059\u3002<\/p>\n<p><span class=\"markerYellow\"><strong>\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u306a\u3089\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u304c\u304a\u3059\u3059\u3081\uff01<\/strong><\/span><\/p>\n\n\n<img decoding=\"async\" src=\"https:\/\/web-img.rensa.jp.net\/rensa\/images\/techmania\/thumbnail\/images\/yuudou.png\" class=\"post-img\">\n\n\n<p>IT\u30b9\u30ad\u30eb\u9700\u8981\u306e\u9ad8\u307e\u308a\u3068\u3068\u3082\u306b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3082\u5897\u3048\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u3001\u3069\u306e\u30b9\u30af\u30fc\u30eb\u306b\u901a\u3046\u3079\u304d\u304b\u8ff7\u3063\u3066\u3057\u307e\u3046\u4eba\u3082\u3044\u308b\u3067\u3057\u3087\u3046\u3002\u305d\u3093\u306a\u65b9\u306b\u306f\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u3092\u304a\u3059\u3059\u3081\u3057\u307e\u3059\uff01\u3053\u308c\u307e\u3067\u591a\u304f\u306eIT\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u80b2\u6210\u30fb\u8f29\u51fa\u3057\u3066\u304d\u305f\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u3067\u3082\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3092\u958b\u8b1b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<div class=\"bgBox\">\n<p><strong>\uff1c\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u306e\u7279\u5fb4\uff1e<\/strong><br \/><strong>\u30fb\u305f\u3057\u304b\u306a\u80b2\u6210\u5b9f\u7e3e\u3068\u89aa\u8eab\u306a\u6559\u80b2\u3000\uff5e\u30bb\u30ab\u30f3\u30c9\u30ad\u30e3\u30ea\u30a2\u3092\u5168\u529b\u652f\u63f4\uff5e<\/strong><br \/><strong>\u30fb\u8b1b\u5e2b\u304c\u73fe\u5f79\u30a8\u30f3\u30b8\u30cb\u30a2\u3000\uff5e\u201c\u672c\u5f53\u201d\u306e\u958b\u767a\u30ce\u30a6\u30cf\u30a6\u3092\u76f4\u306b\u5b66\u3079\u308b\uff5e<\/strong><br \/><strong>\u30fb\u5c02\u5c5e\u8b1b\u5e2b\u304c\u5b66\u7fd2\u3092\u5fb9\u5e95\u30b5\u30dd\u30fc\u30c8\u3000\uff5e\u300c\u308f\u304b\u3089\u306a\u3044\u300d\u3092\u5fb9\u5e95\u89e3\u6c7a\uff5e<\/strong><br \/><strong>\u30fb\u5b9f\u52d9\u30d9\u30fc\u30b9\u3067\u30b9\u30ad\u30eb\u3092\u7fd2\u5f97\u3000\uff5e\u5b9f\u8df5\u7684\u306a\u51dd\u7e2e\u30ab\u30ea\u30ad\u30e5\u30e9\u30e0\uff5e<\/strong><\/p>\n<\/div>\n<p>\u3053\u306e\u3088\u3046\u306a\u7279\u5fb4\u3092\u6301\u3064\u30c6\u30c3\u30af\u30de\u30cb\u30a2\u306fIT\u30a8\u30f3\u30b8\u30cb\u30a2\u306e\u30b9\u30bf\u30fc\u30c8\u30e9\u30a4\u30f3\u3068\u3057\u3066\u6700\u9069\u3067\u3059\u3002<br \/>\u8a71\u3092\u805e\u304d\u305f\u3044\u30fb\u8a73\u3057\u304f\u77e5\u308a\u305f\u3044\u3068\u3044\u3046\u65b9\u306f<a href=\"https:\/\/techmania.jp\/lp\/2\" target=\"_blank\" rel=\"noopener\">\u3053\u3061\u3089<\/a>\u304b\u3089\u304a\u6c17\u8efd\u306b\u304a\u554f\u3044\u5408\u308f\u305b\u304f\u3060\u3055\u3044\u3002<\/p>","protected":false},"excerpt":{"rendered":"\u672c\u8a18\u4e8b\u3067\u306f\u521d\u5fc3\u8005\u5411\u3051\u306bWebDriver\u306e\u57fa\u790e\u77e5\u8b58\u3084\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b\u9806\u30fb\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002 Selenium WebDriver\u3068\u306f Selenium\uff08\u30bb\u30ec\u30cb\u30a6\u30e0\uff09\u306f\u3001Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u306e\u81ea\u52d5\u5316\u3092\u30b5\u30dd\u30fc\u30c8\u3059\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308a\u30012004\u5e74\u306b\u958b\u767a\u3055\u308c\u307e\u3057\u305f\u3002\u591a\u304f\u306e\u30d6\u30e9\u30a6\u30b6\u64cd\u4f5c\u3092\u5916\u90e8\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089\u76f4\u63a5\u5236\u5fa1\u3059\u308bAPI\u3092\u63d0\u4f9b\u3057\u3066\u3044\u307e\u3059\u3002 \u305d\u3057\u3066\u3001Selenium [&hellip;]","protected":false},"author":8,"featured_media":7064,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7055","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/posts\/7055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/comments?post=7055"}],"version-history":[{"count":17,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/posts\/7055\/revisions"}],"predecessor-version":[{"id":8893,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/posts\/7055\/revisions\/8893"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/media\/7064"}],"wp:attachment":[{"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/media?parent=7055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/categories?post=7055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techmania.jp\/blog\/wp-json\/wp\/v2\/tags?post=7055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}