Why Selenium always create temporary Firefox Profiles using Web Driver? -


why selenium create temporary firefox profiles using web driver though told use existing 1 ?

according this answer not possible stop selenium creating temporary firefox profiles using web driver. chromedriver can achieve this. why different firefox. checked firefoxprofile.cs of selenium repo , found following code snipet used copy profile---

public void writetodisk()     {         this.profiledir = generateprofiledirectoryname();         if (!string.isnullorempty(this.sourceprofiledir))         {             fileutilities.copydirectory(this.sourceprofiledir, this.profiledir);         }         else         {             directory.createdirectory(this.profiledir);         }          this.installextensions();         this.deletelockfiles();         this.deleteextensionscache();         this.updateuserpreferences();     } 

but chorme there no such things.

is because webdriver install extension (webdriver.xpi) communicate firefox whereas chromedriver.exe used interact chrome.

if reason, in version 3.0 webdriver using geckodriver.exe communicate firefox. after version 3.0 webdriver create temporary profile firefox more ?

update: today played webdriver v 3.0+ , found latest version legacymode off still generating temporary profile named rust_mozprofile.wuqpxh48avdr. assumption temporary profile generated geckodriver.exe written in rust

i have used chromedriver 3 years , not sure chromedriver.exe generates such type of temporary file. expecting answer experts...

the main reason firefox driver uses temporary profile support use case of running multiple independent simultaneous instances of firefox. @ 1 time, when firefox launched, drop sentinel or lock file in profile directory, , detect file if user attempted start new instance of firefox, preventing them doing so. whether or not firefox still exhibits behavior, driver still has work older versions of browser, , has account it. selenium project's solution issue webdriver, when user wants use specific profile, copy contents of profile new directory, , launch firefox pointing copy.

it sounds mozilla's implementation largely same thing. guess it's same reason - support multiple-instance use case.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -