geckodriver.exe を C:\ に配置し、(漢字がパスに入っていなければ 良い?)
【VBA】
Dim driver As New WebDriver
Dim keys As New keys
Dim by As by
With driver
.SetBinary ("C:\Program Files\Mozilla Firefox\firefox.exe")
'.AddArgument ("-headless")
.SetCapability "excutable_path", "C:\geckodriver.exe"
.Start "firefox", "/"
End With
【Python】
from selenium import webdriver
#from selenium.webdriver.common import desired_capabilities
#from selenium.webdriver.opera import options
from selenium import webdriver
#from selenium.webdriver.firefox.options import Options
#options = Options()
#options.add_argument("-headless")
#driver = webdriver.Firefox(firefox_options=options, executable_path="C:\\geckodriver.exe")
driver = webdriver.Firefox(executable_path="C:\\geckodriver.exe")
【Ruby】
require 'selenium-webdriver'
options = Selenium::WebDriver::Firefox::Options.new(executable_path: ['C:/geckodriver.exe'])
#options = Selenium::WebDriver::Firefox::Options.new(args: ['-headless'] , executable_path: ['C:/geckodriver.exe'])
driver = Selenium::WebDriver.for :firefox, options: options
※ VBA版は 正常に動作していたが
Firefoxをバージョンアップした為か、
Firefoxのプロセスを強制終了した為か
理由が不明だが、不具合が解消されなくなった