{"id":6018,"date":"2015-08-07T14:16:13","date_gmt":"2015-08-07T05:16:13","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=6018"},"modified":"2017-08-11T12:54:38","modified_gmt":"2017-08-11T03:54:38","slug":"microsoft-edge%e3%82%92%e6%93%8d%e4%bd%9c%e3%81%99%e3%82%8bvba%e3%83%9e%e3%82%af%e3%83%adwebdriver%e7%b7%a8","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=6018","title":{"rendered":"Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(WebDriver\u7de8)"},"content":{"rendered":"<p>Microsoft Edge Dev Blog\u306b\u300c<a href=\"http:\/\/blogs.windows.com\/msedgedev\/2015\/07\/23\/bringing-automated-testing-to-microsoft-edge-through-webdriver\/\" title=\"Bringing automated testing to Microsoft Edge through WebDriver | Microsoft Edge Dev Blog\" target=\"_blank\">Bringing automated testing to Microsoft Edge through WebDriver<\/a>\u300d\u3068\u3044\u3063\u305f\u8a18\u4e8b\u304c\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u306e\u8a18\u4e8b\u306b\u3088\u308b\u3068\u300c<a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=48212\" title=\"Download Microsoft WebDriver from Official Microsoft Download Center\" target=\"_blank\">Microsoft WebDriver<\/a>\u300d\u3092\u4f7f\u3048\u3070\u3001\u5916\u90e8\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3001\u3068\u306e\u3053\u3068\u3002<\/p>\n<p>\u5b9f\u969b\u306b<a href=\"http:\/\/docs.seleniumhq.org\/download\/\" title=\"Downloads\" target=\"_blank\">Selenium<\/a>\u3092\u4f7f\u3063\u3066Edge\u3092\u64cd\u4f5c\u3059\u308bC#\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3082\u8f09\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u4e0b\u56f3\u3092\u898b\u308b\u9650\u308aMicrosoft WebDriver Server\u306bJSON\u3092\u6e21\u305b\u3070\u826f\u3044\u3060\u3051\u3067\u3001Selenium\u306f\u5fc5\u9808\u3067\u306f\u7121\u3055\u305d\u3046\u3067\u3059\u3002<\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_01.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_01.png\" alt=\"AutomateMicrosoftEdge_01\" width=\"1364\" height=\"319\" class=\"alignnone size-full wp-image-6019\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_01.png 1364w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_01-300x70.png 300w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_01-1024x239.png 1024w\" sizes=\"auto, (max-width: 1364px) 100vw, 1364px\" \/><\/a><\/p>\n<p><a href=\"http:\/\/blogs.windows.com\/msedgedev\/2015\/07\/23\/bringing-automated-testing-to-microsoft-edge-through-webdriver\/\" title=\"Bringing automated testing to Microsoft Edge through WebDriver | Microsoft Edge Dev Blog\" target=\"_blank\">http:\/\/blogs.windows.com\/msedgedev\/2015\/07\/23\/bringing-automated-testing-to-microsoft-edge-through-webdriver\/<\/a> \u3088\u308a<\/p>\n<p>\u3068\u306a\u308b\u3068\u3064\u307e\u308a\u3001<span style=\"color: #ff0000; font-weight: bold;\">\u201cMicrosoft WebDriver\u3092\u4f7f\u3048\u3070VBA\u304b\u3089\u3067\u3082Edge\u3092\u64cd\u4f5c\u3067\u304d\u308b\uff01\u201d<\/span>\u3068\u3044\u3046\u3053\u3068\u3002<\/p>\n<p>\u3053\u308c\u306f\u3082\u3046\u8a66\u3059\u3057\u304b\u306a\u3044\uff01\uff01<br \/>\n\u3055\u3063\u305d\u304f\u3084\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<h4 class=\"style4a\">\u691c\u8a3c\u74b0\u5883<\/h4>\n<ul>\n<li>Windows 10 Pro 64\u30d3\u30c3\u30c8\u7248<\/li>\n<li>Office 2013 32\u30d3\u30c3\u30c8\u7248<\/li>\n<li>Microsoft Edge 20.10240.16384.0<\/li>\n<\/ul>\n<h4 class=\"style4a\">Microsoft WebDriver\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<ol>\n<li>\u300c<a href=\"https:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=48212\" title=\"Download Microsoft WebDriver from Official Microsoft Download Center\" target=\"_blank\">Download Microsoft WebDriver from Official Microsoft Download Center<\/a>\u300d\u304b\u3089<span style=\"color: #ff0000; font-weight: bold;\">MicrosoftWebDriver.msi<\/span>\u30d5\u30a1\u30a4\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/li>\n<li>\u624b\u98061.\u3067\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f MicrosoftWebDriver.msi \u30d5\u30a1\u30a4\u30eb\u3092\u5b9f\u884c\u3057\u3001\u6307\u793a\u306b\u5f93\u3063\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4f5c\u696d\u3092\u9032\u3081\u307e\u3059\u3002<\/li>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_02.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_02.png\" alt=\"AutomateMicrosoftEdge_02\" width=\"499\" height=\"389\" class=\"alignnone size-full wp-image-6020\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_02.png 499w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_02-300x234.png 300w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/a><\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_03.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_03.png\" alt=\"AutomateMicrosoftEdge_03\" width=\"499\" height=\"389\" class=\"alignnone size-full wp-image-6021\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_03.png 499w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_03-300x234.png 300w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/a><\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_04.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_04.png\" alt=\"AutomateMicrosoftEdge_04\" width=\"499\" height=\"389\" class=\"alignnone size-full wp-image-6022\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_04.png 499w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_04-300x234.png 300w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/a><\/p>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_05.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_05.png\" alt=\"AutomateMicrosoftEdge_05\" width=\"499\" height=\"389\" class=\"alignnone size-full wp-image-6023\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_05.png 499w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_05-300x234.png 300w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/a><\/p>\n<li>\u300cCompleted thr Microsoft Web Driver Setup Wizard\u300d\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u305f\u3089\u300c<span style=\"color: #ff0000; font-weight: bold;\">Finish<\/span>\u300d\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\u4f5c\u696d\u7d42\u4e86\u3067\u3059\u3002<\/li>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_06.png\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_06.png\" alt=\"AutomateMicrosoftEdge_06\" width=\"499\" height=\"389\" class=\"alignnone size-full wp-image-6024\" srcset=\"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_06.png 499w, https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_06-300x234.png 300w\" sizes=\"auto, (max-width: 499px) 100vw, 499px\" \/><\/a>\n<\/ol>\n<p>Microsoft WebDriver\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304c\u7d42\u308f\u308b\u3068\u3001Program Files (x86)\u30d5\u30a9\u30eb\u30c0(32\u30d3\u30c3\u30c8\u7248\u306e\u5834\u5408\u306fProgram Files\u30d5\u30a9\u30eb\u30c0)\u306b\u300c<span style=\"color: #ff0000; font-weight: bold;\">Microsoft Web Driver<\/span>\u300d\u30d5\u30a9\u30eb\u30c0\u304c\u4f5c\u6210\u3055\u308c\u3001\u305d\u306e\u4e2d\u306b\u300c<span style=\"color: #ff0000; font-weight: bold;\">MicrosoftWebDriver.exe<\/span>\u300d\u30d5\u30a1\u30a4\u30eb\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n<h4 class=\"style4a\">Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed<\/h4>\n<p>\u3044\u3088\u3044\u3088Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30b3\u30fc\u30c9\u3067\u3059\u3002<br \/>\n\u4e0b\u8a18\u30b3\u30fc\u30c9\u3067\u306f\u3001<\/p>\n<ol>\n<li>Microsoft WebDriver Server(localhost)\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/li>\n<li>\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u958b\u59cb\u3057\u307e\u3059\u3002<\/li>\n<li>Yahoo! JAPAN\u306b\u30da\u30fc\u30b8\u79fb\u52d5\u3057\u3001\u300c@kinuasa\u300d\u3092\u30ad\u30fc\u30ef\u30fc\u30c9\u306b\u691c\u7d22\u3092\u884c\u3044\u307e\u3059\u3002<\/li>\n<li>\u691c\u7d22\u7d50\u679c\u306e\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u3092\u4fdd\u5b58(Base64\u6587\u5b57\u5217\u3092\u30c7\u30b3\u30fc\u30c9)\u3057\u307e\u3059\u3002<\/li>\n<li>\u30bb\u30c3\u30b7\u30e7\u30f3\u3092\u7d42\u4e86\u3057\u307e\u3059\u3002<\/li>\n<li>Microsoft WebDriver Server\u3092\u7d42\u4e86\u3057\u307e\u3059\u3002<\/li>\n<\/ol>\n<p>\u3068\u3044\u3063\u305f\u3053\u3068\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\nWebDriver Server\u306b\u6e21\u3059\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u4e0b\u8a18Web\u30da\u30fc\u30b8\u3092\u53c2\u8003\u306b\u3057\u307e\u3057\u305f\u3002<br \/>\n\u7279\u306b<span style=\"color: #ff0000; font-weight: bold;\">Test Drive<\/span>\u306f\u30ec\u30b9\u30dd\u30f3\u30b9\u3082\u78ba\u8a8d\u3057\u3084\u3059\u3044\u306e\u3067\u3001\u3068\u3066\u3082\u53c2\u8003\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<ul>\n<li>Test Drive &#8211; WebDriver<\/li>\n<li style=\"list-style-type:none;\"><a href=\"http:\/\/dev.modern.ie\/testdrive\/demos\/webdriver\/\" target=\"_blank\" title=\"Test Drive - WebDriver\">http:\/\/dev.modern.ie\/testdrive\/demos\/webdriver\/<\/a><\/li>\n<li>WebDriver Status<\/li>\n<li style=\"list-style-type:none;\"><a href=\"http:\/\/dev.modern.ie\/platform\/status\/webdriver\/details\/\" target=\"_blank\" title=\"WebDriver Status\">http:\/\/dev.modern.ie\/platform\/status\/webdriver\/details\/<\/a><\/li>\n<\/ul>\n<p><span style=\"color: #ff0000; font-weight: bold;\">\u203b \u4e0b\u8a18\u30b3\u30fc\u30c9\u3067\u306fJSON\u306e\u30d1\u30fc\u30b9\u306bScriptControl\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u305f\u3081\u300164\u30d3\u30c3\u30c8\u7248\u306eOffice\u3067\u306f\u52d5\u4f5c\u3057\u307e\u305b\u3093\u3002<\/span><\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPrivate Declare Sub Sleep Lib &quot;kernel32&quot; (ByVal dwMilliseconds As Long)\r\n\r\nPublic Sub AutomateMicrosoftEdge()\r\n'Microsoft WebDriver\u3092\u4f7f\u3063\u3066Edge\u3092\u64cd\u4f5c\u3059\u308b\r\n  Dim sc As Object\r\n  Dim proc As Object\r\n  Dim json As Object, ary As Object\r\n  Dim jstr As String\r\n  Dim sid As Variant, eid As Variant, b64 As Variant\r\n  Dim eval\r\n  Dim WebDriverFilePath As String\r\n  Const WebDriverFileName As String = &quot;MicrosoftWebDriver.exe&quot;\r\n  Const URI As String = &quot;http:\/\/localhost:17556\/&quot;\r\n  Const CSIDL_PROGRAM_FILESX86 = 42\r\n  \r\n  'Microsoft WebDriver Server\u5b9f\u884c\r\n  WebDriverFilePath = CreateObject(&quot;Shell.Application&quot;).Namespace(CSIDL_PROGRAM_FILESX86).Self.Path\r\n  WebDriverFilePath = WebDriverFilePath &amp; &quot;\\Microsoft Web Driver\\&quot; &amp; WebDriverFileName\r\n  If CreateObject(&quot;Scripting.FileSystemObject&quot;) _\r\n     .FileExists(WebDriverFilePath) = False Then Exit Sub\r\n  If CreateObject(&quot;WbemScripting.SWbemLocator&quot;).ConnectServer.ExecQuery _\r\n     (&quot;Select * From Win32_Process Where Name = '&quot; &amp; WebDriverFileName &amp; &quot;'&quot;).Count &lt; 1 Then\r\n    Set proc = CreateObject(&quot;WScript.Shell&quot;).Exec(WebDriverFilePath)\r\n  End If\r\n  \r\n  Set sc = CreateObject(&quot;ScriptControl&quot;)\r\n  sc.Language = &quot;JScript&quot;\r\n  With CreateObject(&quot;MSXML2.XMLHTTP&quot;)\r\n    '\u30bb\u30c3\u30b7\u30e7\u30f3\u958b\u59cb(sessionId\u53d6\u5f97)\r\n    .Open &quot;POST&quot;, URI &amp; &quot;session&quot;, False\r\n    .setRequestHeader &quot;Content-Type&quot;, &quot;text\/plain; charset=UTF-8&quot;\r\n    .send &quot;{&quot;&quot;desiredCapabilities&quot;&quot;: {}, &quot;&quot;requiredCapabilities&quot;&quot;: {}}&quot;\r\n    If .Status &lt;&gt; 200 Then GoTo Err\r\n    jstr = &quot;(&quot; &amp; .responseText &amp; &quot;)&quot;\r\n    Set json = sc.CodeObject.eval(jstr)\r\n    sid = VBA.CallByName(json, &quot;sessionId&quot;, VbGet)\r\n    If IsNull(sid) = True Then GoTo Err\r\n    \r\n    'Yahoo! JAPAN\u306b\u30da\u30fc\u30b8\u79fb\u52d5\r\n    .Open &quot;POST&quot;, URI &amp; &quot;session\/&quot; &amp; sid &amp; &quot;\/url&quot;, False\r\n    .setRequestHeader &quot;Content-Type&quot;, &quot;text\/plain; charset=UTF-8&quot;\r\n    .send &quot;{&quot;&quot;url&quot;&quot;: &quot;&quot;http:\/\/www.yahoo.co.jp\/&quot;&quot;}&quot;\r\n    If .Status &lt;&gt; 200 Then GoTo Err\r\n    \r\n    '\u691c\u7d22\u30dc\u30c3\u30af\u30b9(srchtxt)\u53d6\u5f97\r\n    .Open &quot;POST&quot;, URI &amp; &quot;session\/&quot; &amp; sid &amp; &quot;\/element&quot;, False\r\n    .setRequestHeader &quot;Content-Type&quot;, &quot;text\/plain; charset=UTF-8&quot;\r\n    .send &quot;{&quot;&quot;using&quot;&quot;: &quot;&quot;id&quot;&quot;, &quot;&quot;value&quot;&quot;: &quot;&quot;srchtxt&quot;&quot;}&quot;\r\n    If .Status &lt;&gt; 200 Then GoTo Err\r\n    jstr = &quot;(&quot; &amp; .responseText &amp; &quot;)&quot;\r\n    Set json = sc.CodeObject.eval(jstr)\r\n    Set ary = VBA.CallByName(json, &quot;value&quot;, VbGet)\r\n    eid = VBA.CallByName(ary, &quot;ELEMENT&quot;, VbGet)\r\n    If IsNull(eid) = True Then GoTo Err\r\n    \r\n    '\u691c\u7d22\u30dc\u30c3\u30af\u30b9\u306b\u6587\u5b57\u5217\u9001\u4fe1(Send Keys)\r\n    .Open &quot;POST&quot;, URI &amp; &quot;session\/&quot; &amp; sid &amp; &quot;\/element\/&quot; &amp; eid &amp; &quot;\/value&quot;, False\r\n    .setRequestHeader &quot;Content-Type&quot;, &quot;text\/plain; charset=UTF-8&quot;\r\n    .send &quot;{&quot;&quot;value&quot;&quot;:&#x5B;&quot;&quot;@kinuasa&quot;&quot;]}&quot;\r\n    If .Status &lt;&gt; 200 Then GoTo Err\r\n    \r\n    '\u691c\u7d22\u30dc\u30bf\u30f3(srchbtn)\u53d6\u5f97\r\n    .Open &quot;POST&quot;, URI &amp; &quot;session\/&quot; &amp; sid &amp; &quot;\/element&quot;, False\r\n    .setRequestHeader &quot;Content-Type&quot;, &quot;text\/plain; charset=UTF-8&quot;\r\n    .send &quot;{&quot;&quot;using&quot;&quot;: &quot;&quot;id&quot;&quot;, &quot;&quot;value&quot;&quot;: &quot;&quot;srchbtn&quot;&quot;}&quot;\r\n    If .Status &lt;&gt; 200 Then GoTo Err\r\n    jstr = &quot;(&quot; &amp; .responseText &amp; &quot;)&quot;\r\n    Set json = sc.CodeObject.eval(jstr)\r\n    Set ary = VBA.CallByName(json, &quot;value&quot;, VbGet)\r\n    eid = VBA.CallByName(ary, &quot;ELEMENT&quot;, VbGet)\r\n    If IsNull(eid) = True Then GoTo Err\r\n    \r\n    '\u691c\u7d22\u30dc\u30bf\u30f3\u30af\u30ea\u30c3\u30af\r\n    .Open &quot;POST&quot;, URI &amp; &quot;session\/&quot; &amp; sid &amp; &quot;\/element\/&quot; &amp; eid &amp; &quot;\/click&quot;, False\r\n    .setRequestHeader &quot;Content-Type&quot;, &quot;text\/plain; charset=UTF-8&quot;\r\n    .send\r\n    If .Status &lt;&gt; 200 Then GoTo Err\r\n    \r\n    '\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8\u53d6\u5f97\r\n    Sleep 3000 '\u8868\u793a\u5f85\u3061\r\n    .Open &quot;GET&quot;, URI &amp; &quot;session\/&quot; &amp; sid &amp; &quot;\/screenshot&quot;, False\r\n    .setRequestHeader &quot;Content-Type&quot;, &quot;text\/plain; charset=UTF-8&quot;\r\n    .send\r\n    If .Status &lt;&gt; 200 Then GoTo Err\r\n    jstr = &quot;(&quot; &amp; .responseText &amp; &quot;)&quot;\r\n    Set json = sc.CodeObject.eval(jstr)\r\n    b64 = VBA.CallByName(json, &quot;value&quot;, VbGet)\r\n    If IsNull(b64) = True Then GoTo Err\r\n    DecodeBase64 b64, ActiveWorkbook.Path &amp; &quot;\\ScreenShot.png&quot;\r\n    \r\n    '\u30bb\u30c3\u30b7\u30e7\u30f3\u7d42\u4e86\r\n    .Open &quot;DELETE&quot;, URI &amp; &quot;session\/&quot; &amp; sid, False\r\n    .setRequestHeader &quot;Content-Type&quot;, &quot;text\/plain; charset=UTF-8&quot;\r\n    .send\r\n    If .Status &lt;&gt; 200 Then GoTo Err\r\n  End With\r\n  \r\n  If Not proc Is Nothing Then proc.Terminate 'Microsoft WebDriver Server\u7d42\u4e86\r\n  MsgBox &quot;\u51e6\u7406\u304c\u7d42\u4e86\u3057\u307e\u3057\u305f\u3002&quot;, vbInformation + vbSystemModal\r\n  Exit Sub\r\nErr:\r\n  MsgBox &quot;\u51e6\u7406\u304c\u5931\u6557\u3057\u307e\u3057\u305f\u3002&quot;, vbExclamation + vbSystemModal\r\nEnd Sub\r\n\r\nPrivate Function DecodeBase64(ByVal Base64Str As String, ByVal FilePath As String) As Long\r\n'\u30d5\u30a1\u30a4\u30eb\u3092Base64\u30c7\u30b3\u30fc\u30c9\r\n  Dim elm As Object\r\n  Dim ret As Long\r\n  Const adTypeBinary = 1\r\n  Const adSaveCreateOverWrite = 2\r\n  \r\n  ret = -1 '\u521d\u671f\u5316\r\n  On Error Resume Next\r\n  Set elm = CreateObject(&quot;MSXML2.DOMDocument&quot;).createElement(&quot;base64&quot;)\r\n  elm.DataType = &quot;bin.base64&quot;\r\n  elm.Text = Base64Str\r\n  With CreateObject(&quot;ADODB.Stream&quot;)\r\n    .Type = adTypeBinary\r\n    .Open\r\n    .Write elm.nodeTypedValue\r\n    .SaveToFile FilePath, adSaveCreateOverWrite\r\n    .Close\r\n  End With\r\n  If Err.Number &lt;&gt; 0 Then ret = 0\r\n  On Error GoTo 0\r\n  DecodeBase64 = ret\r\nEnd Function<\/pre>\n<p><a href=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_07.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"\/\/www.ka-net.org\/blog\/wp-content\/uploads\/AutomateMicrosoftEdge_07.gif\" alt=\"AutomateMicrosoftEdge_07\" width=\"650\" height=\"341\" class=\"alignnone size-full wp-image-6025\" \/><\/a><\/p>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u3067\u306f\u3001Edge\u3092\u64cd\u4f5c\u3059\u308b\u306e\u306b\u3044\u3061\u3044\u3061JSON\u3067\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u6295\u3052\u3066\u3044\u307e\u3059\u304c\u3001\u305d\u306e\u3046\u3061<a href=\"http:\/\/florentbr.github.io\/SeleniumBasic\/\" title=\"Seleniumbasic\" target=\"_blank\">Selenium VBA<\/a>\u3042\u305f\u308a\u304cEdge\u306b\u5bfe\u5fdc\u3057\u3066\u304f\u308c\u308b\u306e\u3067\u306f\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u305d\u3046\u306a\u308c\u3070\u3001\u3082\u3046\u3061\u3087\u3063\u3068\u30b7\u30f3\u30d7\u30eb\u306a\u30b3\u30fc\u30c9\u3067Edge\u3092\u64cd\u4f5c\u3067\u304d\u305d\u3046\u3067\u3059\u3002<\/p>\n<p><span style=\"color: #ff0000; font-weight: bold;\">2015\/11\/01 \u8ffd\u8a18\uff1a<\/span><br \/>\nSeleniumBasic(\u65e7Selenium VBA)\u304cMicrosoft Edge\u306b\u5bfe\u5fdc\u3057\u307e\u3057\u305f\u3002<br \/>\n<a href=\"\/\/www.ka-net.org\/blog\/?p=6394\" target=\"_blank\">\/\/www.ka-net.org\/blog\/?p=6394<\/a><\/p>\n<div id=\"single_banner_area2\" class=\"clearfix one_banner\">\n<div class=\"single_banner single_banner_left\">\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script>\r\n<!-- \u8a18\u4e8b\u4e2d(\u30c7\u30a3\u30b9\u30d7\u30ec\u30a4\u5e83\u544a\u30e6\u30cb\u30c3\u30c8) -->\r\n<ins class=\"adsbygoogle\"\r\n     style=\"display:block\"\r\n     data-ad-client=\"ca-pub-7306936664602087\"\r\n     data-ad-slot=\"5429724765\"\r\n     data-ad-format=\"auto\"\r\n     data-full-width-responsive=\"true\"><\/ins>\r\n<script>\r\n     (adsbygoogle = window.adsbygoogle || []).push({});\r\n<\/script>\n<\/div>\n<div class=\"single_banner single_banner_right\">\n<a href=\"\" target=\"_blank\"><img decoding=\"async\" src=\"\" alt=\"\" title=\"\" \/><\/a>\n<\/div>\n<\/div>\n\n<h4 class=\"style4a\">\u95a2\u9023\u8a18\u4e8b<\/h4>\n<ul>\n<li>Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(WebDriver\u7de8)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6018\" target=\"_blank\" title=\"Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(WebDriver\u7de8)\">\/\/www.ka-net.org\/blog\/?p=6018<\/a><\/li>\n<li>PowerShell\u3067Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308b<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6029\" target=\"_blank\" title=\"PowerShell\u3067Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308b\">\/\/www.ka-net.org\/blog\/?p=6029<\/a><\/li>\n<li>Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6033\" target=\"_blank\" title=\"Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)\">\/\/www.ka-net.org\/blog\/?p=6033<\/a><\/li>\n<li>\u7d9a\u30fbMicrosoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6068\" target=\"_blank\" title=\"\u7d9a\u30fbMicrosoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)\">\/\/www.ka-net.org\/blog\/?p=6068<\/a><\/li>\n<li>Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBScript<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6129\" target=\"_blank\" title=\"Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBScript\">\/\/www.ka-net.org\/blog\/?p=6129<\/a><\/li>\n<li>\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed(UI Automation\u7de8)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6076\" target=\"_blank\" title=\"\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed(UI Automation\u7de8)\">\/\/www.ka-net.org\/blog\/?p=6076<\/a><\/li>\n<li>\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6086\" target=\"_blank\" title=\"\u8d77\u52d5\u4e2d\u306eMicrosoft Edge\u304b\u3089\u30bf\u30a4\u30c8\u30eb\u3068URL\u3092\u53d6\u5f97\u3059\u308bVBA\u30de\u30af\u30ed(DOM\u7de8)\">\/\/www.ka-net.org\/blog\/?p=6086<\/a><\/li>\n<li>Microsoft Edge\u3067Web\u30da\u30fc\u30b8\u3092\u958b\u304f\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6040\" target=\"_blank\" title=\"Microsoft Edge\u3067Web\u30da\u30fc\u30b8\u3092\u958b\u304f\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u30b7\u30e7\u30fc\u30c8\u30ab\u30c3\u30c8\">\/\/www.ka-net.org\/blog\/?p=6040<\/a><\/li>\n<li>Microsoft Edge\u3092\u8d77\u52d5\u3059\u308bVBScript<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6048\" target=\"_blank\" title=\"Microsoft Edge\u3092\u8d77\u52d5\u3059\u308bVBScript\">\/\/www.ka-net.org\/blog\/?p=6048<\/a><\/li>\n<li>Microsoft Edge\u3067\u30ea\u30f3\u30af\u5148\u3092\u958b\u304f<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6050\" target=\"_blank\" title=\"Microsoft Edge\u3067\u30ea\u30f3\u30af\u5148\u3092\u958b\u304f\">\/\/www.ka-net.org\/blog\/?p=6050<\/a><\/li>\n<li>\u300c\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u3066\u5b9f\u884c\u300d\u304b\u3089Microsoft Edge\u3092\u8d77\u52d5\u3059\u308b<\/li>\n<li style=\"list-style-type:none;\"><a href=\"\/\/www.ka-net.org\/blog\/?p=6098\" target=\"_blank\" title=\"\u300c\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u6307\u5b9a\u3057\u3066\u5b9f\u884c\u300d\u304b\u3089Microsoft Edge\u3092\u8d77\u52d5\u3059\u308b\">\/\/www.ka-net.org\/blog\/?p=6098<\/a><\/li>\n","protected":false},"excerpt":{"rendered":"Microsoft Edge Dev Blog\u306b\u300cBringing automated testing to Microsoft Edge through WebDriver\u300d\u3068\u3044\u3063\u305f\u8a18\u4e8b\u304c\u3042\u308a\u307e\u3057\u305f\u3002 \u3053\u306e\u8a18\u4e8b\u306b\u3088\u308b\u3068 [&hellip;]","protected":false},"author":1,"featured_media":7111,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"#Windows10 \u306e #Edge \u3092 #Excel #VBA \u304b\u3089\u64cd\u4f5c\u3057\u3066\u307f\u307e\u3057\u305f\u3002 [Microsoft Edge\u3092\u64cd\u4f5c\u3059\u308bVBA\u30de\u30af\u30ed(WebDriver\u7de8)]","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,48,132,25,49,58,133,154],"tags":[],"class_list":["post-6018","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-excel-office","category-windows10","category-windows","category-word-office","category-powerpoint","category-microsoft-edge","category-selenium"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Excel.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-1z4","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6018","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6018"}],"version-history":[{"count":13,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6018\/revisions"}],"predecessor-version":[{"id":9042,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6018\/revisions\/9042"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7111"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6018"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6018"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6018"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}