selenium - 是 Firefox 还是 Geckodriver,它创建了 "rust_mozprofile"目录

标签 selenium firefox selenium-webdriver geckodriver

每当我们调用 Firefox 时,都会在“/tmp”目录下创建 rust_mozprofile 目录。由于 Firefox 内部调用 Geckodriver,我们不确定 Firefox 还是 Geckodriver 正在创建 rust_mozprofile 目录。

我确实想知道是 Geckodriver 还是 Firefox,因为我的“/tmp”目录内存较少。

所以问题是我真的想修改为rust_mozprofile创建目录的路径。

我正在使用以下技术,

  • Selenium - 3.3.0
  • 火狐 - 52.2.0
  • 壁虎驱动器 - 13

如果有任何建议,请给我们一些建议。

最佳答案

如果您仔细查看 geckodriver v0.18.0 日志,您会发现 rust_mozprofile 的第一次出现出现在以下行中:

1504762617094   Marionette  CONFIG  Matched capabilities: {"browserName":"firefox","browserVersion":"56.0","platformName":"windows_nt","platformVersion":"6.2","pageLoadStrategy":"normal","acceptInsecureCerts":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"rotatable":false,"specificationLevel":0,"moz:processID":5848,"moz:profile":"C:\\Users\\AtechM_03\\AppData\\Local\\Temp\\rust_mozprofile.OfFuR9ogm33d","moz:accessibilityChecks":false,"moz:headless":false}

此日志清楚地表明 正在配置:

"moz:profile":"C:\\Users\\AtechM_03\\AppData\\Local\\Temp\\rust_mozprofile.OfFuR9ogm33d" 

而这个配置是由 WebDriver 完成的实例,即 GeckoDriver

GeckoDriver 在内部配置 Marionette,进而启动 Mozilla Firefox 浏览器

IMO,自从我们从旧版 Firefox 迁移到基于 MarionetteFirefox 以来,此工作流程就已付诸实践。因此,Geckodriver - 13 的情况也一定如此。

<小时/>

更新:

GeckoDriver 作为应用程序/exe 文件: enter image description here

关于selenium - 是 Firefox 还是 Geckodriver,它创建了 "rust_mozprofile"目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46088442/

相关文章:

python - Selenium headless ChromeDriver 失败并出现 ConnectionResetError : [Errno 104] Connection reset by peer

python - 如何使用Python通过Selenium点击图片

python - 抓取结果与检查的 DOM 元素不同

javascript - 使用Javascript如何解决异步问题?

javascript - 有没有办法在 Firefox 扩展中对控件进行分组?

python - 如何在特定版本的 Firefox(使用 Python)中运行 webdriver 测试?

java - 无法使用java获取IE中新打开的窗口的句柄

javascript - 如何使用 Selenium x-path 查找包含单词 "download"的所有元素?

CSS3 线性渐变在 Firefox 上无法正常工作

ruby - Selenium Ruby Webdriver - 如何关闭显示弹出窗口的 IE9 浏览器 session