Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 932
Yaswanth Avatar asked Sep 07 '17 05:09

Yaswanth


2 Answers

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 marionette 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

like image 160
undetected Selenium Avatar answered Oct 22 '22 14:10

undetected Selenium


You can set the location with the TMPDIR envvar. It's also useful to set both TMP and TEMP for other programs.

like image 27
Nandi Avatar answered Oct 22 '22 14:10

Nandi