Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

selenium - Is it Firefox or Geckodriver, which creates "rust_mozprofile" directory

Whenever we invoke Firefox, under '/tmp' directory rust_mozprofile directories are getting created. As Firefox internally calls Geckodriver we are not sure whether Firefox or Geckodriver is creating rust_mozprofile directory.

I do want to know whether Geckodriver or Firefox because, my '/tmp' directory is having less memory.

So the question is I really want to modify the path of creating directories for rust_mozprofile.

I am using below technologies,

  • Selenium - 3.3.0
  • Firefox - 52.2.0
  • Geckodriver - 13

Please give us some suggestion, if there is any.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you have a closer look at the geckodriver v0.18.0 logs closely you will observe the very first occurrence of rust_mozprofile occurs in the following line:

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}

This log clearly indicates that is being configured with:

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

And this configuration is done by the WebDriver instance i.e. the GeckoDriver.

It's the GeckoDriver which internally configures the Marionette which in-turn initiates the Mozilla Firefox Browser.

IMO, this workflow is in practice since we migrated from the Legacy Firefox to Marionette based Firefox. Hence the same must be the case with Geckodriver - 13 as well.


Update:

GeckoDriver as an application/exe file: enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...