前提・実現したいこと
もとからFirefoxに入っているような状態ではなく、起動する毎にインストールするようにしたいです。
該当のソースコード
Kotlin
1System.setProperty("webdriver.gecko.driver", "geckodriver.exe") 2val profile = FirefoxProfile() 3profile.addExtension(File("user_agent_switcher_and_manager-0.4.7.1-an+fx.xpi")) 4val option = FirefoxOptions() 5option.setProfile(profile) 6val driver = FirefoxDriver(option) 7 8driver["https://youtube.com/"]
補足情報(FW/ツールのバージョンなど)
IntelliJ IDEA
Kotlin 211-1.6.10-release-923-IJ7442.40
Firefox 97.0.1 (64-bit)
JDK 17.0.1
あなたの回答
tips
プレビュー