差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
selenium-webdriver [2025/11/06 20:29] skkselenium-webdriver [2025/11/06 20:33] (現在) skk
行 1: 行 1:
-= [[selenium-webdriver]] LM: [2025-11-06 20:29:25]+= [[selenium-webdriver]] LM: [2025-11-06 20:33:13]
 ~~NOCACHE~~ ~~NOCACHE~~
  
行 171: 行 171:
 ===== - SeleniumBase の動作設定 [2025-02-22] ===== ===== - SeleniumBase の動作設定 [2025-02-22] =====
 SeleniumBase もソースコードないでは Linux への分岐しか対応してない.ただ,undetected_chromedriver は Linux バイナリをダウンロードしてきていたので,Linux Emulation しなければならなかったが,SeleniumBase は chromedriver に対してなんらかの方法でパッチを当てているので,FreeBSD でインストールできる Chromium に附属している chromedriver をベースにして動作する.つまり,linux emulation しなくても大丈夫. SeleniumBase もソースコードないでは Linux への分岐しか対応してない.ただ,undetected_chromedriver は Linux バイナリをダウンロードしてきていたので,Linux Emulation しなければならなかったが,SeleniumBase は chromedriver に対してなんらかの方法でパッチを当てているので,FreeBSD でインストールできる Chromium に附属している chromedriver をベースにして動作する.つまり,linux emulation しなくても大丈夫.
 +
 +[2025-11-06] 8 ヶ月ぶりにバージョンアップしたが,すでにそこそこ変更点があった.特に,OS/プラットフォームの分岐のコードが増えていたので,その部分は要修正.というかこれ,FreeBSD で使いたい人いないのかな.ports にして,patch をみんなで管理したら便利だと思うんだけどな...
  
 ==== - python ライブラリの準備 ==== ==== - python ライブラリの準備 ====
行 222: 行 224:
  
 <code python> <code python>
-     34 class OSType(object): + 34 class OSType(object): 
-     35     LINUX = "linux" + 35     LINUX = "linux" 
-     36     FREEBSD = "freebsd" + 36     FREEBSD = "freebsd" 
-     37     MAC = "mac" + 37     MAC = "mac" 
-     38     WIN = "win" + 38     WIN = "win" 
-     39 + 39 
-     56 def os_name(): + 56 def os_name(): 
-     57     if "linux" in sys.platform: + 57     if "linux" in sys.platform: 
-     58         return OSType.LINUX + 58         return OSType.LINUX 
-     59     elif "freebsd" in sys.platform: + 59     elif "freebsd" in sys.platform: 
-     60         return OSType.FREEBSD + 60         return OSType.FREEBSD 
-     61     elif "darwin" in sys.platform: + 61     elif "darwin" in sys.platform: 
-     62         return OSType.MAC + 62         return OSType.MAC 
-    109     if os_name() != OSType.LINUX or os_name() != OSType.FREEBSD: +109     if os_name() != OSType.LINUX or os_name() != OSType.FREEBSD: 
-    110         return "" +110         return "" 
-    111     paths = [ +111     paths = [ 
-    112         "/bin/google-chrome", +112         "/bin/google-chrome", 
-    434         ChromeType.GOOGLE:+434         ChromeType.GOOGLE:
-    435             OSType.LINUX: chrome_on_linux_path(chromium_ok, browser_type), +435             OSType.LINUX: chrome_on_linux_path(chromium_ok, browser_type), 
-    436             OSType.FREEBSD: chrome_on_linux_path(chromium_ok, browser_type), +436             OSType.FREEBSD: chrome_on_linux_path(chromium_ok, browser_type), 
-    437             OSType.MAC: r"/Applications/Google Chrome.app" +437             OSType.MAC: r"/Applications/Google Chrome.app" 
-    438                         r"/Contents/MacOS/Google Chrome", +438                         r"/Contents/MacOS/Google Chrome", 
-    439             OSType.WIN: chrome_on_windows_path(browser_type), +439             OSType.WIN: chrome_on_windows_path(browser_type), 
-    440         },      +440         },      
-    517             OSType.FREEBSD: linux_browser_apps_to_cmd( +517             OSType.FREEBSD: linux_browser_apps_to_cmd( 
-    518                 "google-chrome", +518                 "google-chrome", 
-    519                 "google-chrome-stable", +519                 "google-chrome-stable", 
-    520                 "chrome", +520                 "chrome", 
-    521                 "chromium", +521                 "chromium", 
-    522                 "chromium-browser", +522                 "chromium-browser", 
-    523                 "google-chrome-beta", +523                 "google-chrome-beta", 
-    524                 "google-chrome-dev", +524                 "google-chrome-dev", 
-    525                 "google-chrome-unstable", +525                 "google-chrome-unstable", 
-    526             ),+526             ),
 </code> </code>
  
selenium-webdriver.1762428582.txt.gz · 最終更新: 2025/11/06 20:29 by skk
文書の先頭へ
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0