Python Firefox Selenium Load Profile











up vote
1
down vote

favorite












I tried many combinations of Geckodrive,Selenium and Python but i could not achieved to load Firefox profile what i need.It loads the default profile.
The lastest code is below and I opened an issue on github Selenium page but there is still no solution.There are some solutions about Java but I am not able to bind it in Python.A temp file created on temp folder which includes profile data and cookies.That mean selenium does not use any profile's cookies and other configurations



Any solutions will be apprecited.



Geckodrive version:0.23
Selenium 3.14
Python 3.7
Firefox 61



from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from selenium.webdriver.support.ui import WebDriverWait

fp = FirefoxProfile('C:\Users\<USER>\AppData\Roaming\Mozilla\Firefox\Profiles\ji8rbij6.test')
fp.update_preferences()
browser = webdriver.Firefox(firefox_profile=fp)


Thanks in advance



PS. I tried this code block in 3 different computer because of being able to have a problem on my own computer










share|improve this question
























  • test your profile, run command or create shortcut with Target "<your_dir>firefox.exe" -P test -no-remote
    – ewwink
    Nov 7 at 8:30












  • Thanks for helping @ewwink what shoul i see when run this command? It opens a new firefox window.
    – digging
    Nov 7 at 9:06










  • it should open firefox with test profile, it is returned firefox with expected profile? FYI, your code is fine it open selected profile in my windows
    – ewwink
    Nov 7 at 9:10










  • OMG! Code is fine and works fine on your machine OMG I am in trouble now that s mean the problem is more than code now! Selenium opens firefox window what it sets on default firefox.My aim for using firefox profile is that Selenium can open webdriver more quicker and do not create temp profile instance file in temp folder.
    – digging
    Nov 7 at 9:20










  • maybe you have multiple test profile, check in profile dir or create other profile with unique name
    – ewwink
    Nov 7 at 9:27

















up vote
1
down vote

favorite












I tried many combinations of Geckodrive,Selenium and Python but i could not achieved to load Firefox profile what i need.It loads the default profile.
The lastest code is below and I opened an issue on github Selenium page but there is still no solution.There are some solutions about Java but I am not able to bind it in Python.A temp file created on temp folder which includes profile data and cookies.That mean selenium does not use any profile's cookies and other configurations



Any solutions will be apprecited.



Geckodrive version:0.23
Selenium 3.14
Python 3.7
Firefox 61



from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from selenium.webdriver.support.ui import WebDriverWait

fp = FirefoxProfile('C:\Users\<USER>\AppData\Roaming\Mozilla\Firefox\Profiles\ji8rbij6.test')
fp.update_preferences()
browser = webdriver.Firefox(firefox_profile=fp)


Thanks in advance



PS. I tried this code block in 3 different computer because of being able to have a problem on my own computer










share|improve this question
























  • test your profile, run command or create shortcut with Target "<your_dir>firefox.exe" -P test -no-remote
    – ewwink
    Nov 7 at 8:30












  • Thanks for helping @ewwink what shoul i see when run this command? It opens a new firefox window.
    – digging
    Nov 7 at 9:06










  • it should open firefox with test profile, it is returned firefox with expected profile? FYI, your code is fine it open selected profile in my windows
    – ewwink
    Nov 7 at 9:10










  • OMG! Code is fine and works fine on your machine OMG I am in trouble now that s mean the problem is more than code now! Selenium opens firefox window what it sets on default firefox.My aim for using firefox profile is that Selenium can open webdriver more quicker and do not create temp profile instance file in temp folder.
    – digging
    Nov 7 at 9:20










  • maybe you have multiple test profile, check in profile dir or create other profile with unique name
    – ewwink
    Nov 7 at 9:27















up vote
1
down vote

favorite









up vote
1
down vote

favorite











I tried many combinations of Geckodrive,Selenium and Python but i could not achieved to load Firefox profile what i need.It loads the default profile.
The lastest code is below and I opened an issue on github Selenium page but there is still no solution.There are some solutions about Java but I am not able to bind it in Python.A temp file created on temp folder which includes profile data and cookies.That mean selenium does not use any profile's cookies and other configurations



Any solutions will be apprecited.



Geckodrive version:0.23
Selenium 3.14
Python 3.7
Firefox 61



from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from selenium.webdriver.support.ui import WebDriverWait

fp = FirefoxProfile('C:\Users\<USER>\AppData\Roaming\Mozilla\Firefox\Profiles\ji8rbij6.test')
fp.update_preferences()
browser = webdriver.Firefox(firefox_profile=fp)


Thanks in advance



PS. I tried this code block in 3 different computer because of being able to have a problem on my own computer










share|improve this question















I tried many combinations of Geckodrive,Selenium and Python but i could not achieved to load Firefox profile what i need.It loads the default profile.
The lastest code is below and I opened an issue on github Selenium page but there is still no solution.There are some solutions about Java but I am not able to bind it in Python.A temp file created on temp folder which includes profile data and cookies.That mean selenium does not use any profile's cookies and other configurations



Any solutions will be apprecited.



Geckodrive version:0.23
Selenium 3.14
Python 3.7
Firefox 61



from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from selenium.webdriver.support.ui import WebDriverWait

fp = FirefoxProfile('C:\Users\<USER>\AppData\Roaming\Mozilla\Firefox\Profiles\ji8rbij6.test')
fp.update_preferences()
browser = webdriver.Firefox(firefox_profile=fp)


Thanks in advance



PS. I tried this code block in 3 different computer because of being able to have a problem on my own computer







python selenium firefox geckodriver selenium-firefoxdriver






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 8 at 14:37

























asked Nov 7 at 7:48









digging

2316




2316












  • test your profile, run command or create shortcut with Target "<your_dir>firefox.exe" -P test -no-remote
    – ewwink
    Nov 7 at 8:30












  • Thanks for helping @ewwink what shoul i see when run this command? It opens a new firefox window.
    – digging
    Nov 7 at 9:06










  • it should open firefox with test profile, it is returned firefox with expected profile? FYI, your code is fine it open selected profile in my windows
    – ewwink
    Nov 7 at 9:10










  • OMG! Code is fine and works fine on your machine OMG I am in trouble now that s mean the problem is more than code now! Selenium opens firefox window what it sets on default firefox.My aim for using firefox profile is that Selenium can open webdriver more quicker and do not create temp profile instance file in temp folder.
    – digging
    Nov 7 at 9:20










  • maybe you have multiple test profile, check in profile dir or create other profile with unique name
    – ewwink
    Nov 7 at 9:27




















  • test your profile, run command or create shortcut with Target "<your_dir>firefox.exe" -P test -no-remote
    – ewwink
    Nov 7 at 8:30












  • Thanks for helping @ewwink what shoul i see when run this command? It opens a new firefox window.
    – digging
    Nov 7 at 9:06










  • it should open firefox with test profile, it is returned firefox with expected profile? FYI, your code is fine it open selected profile in my windows
    – ewwink
    Nov 7 at 9:10










  • OMG! Code is fine and works fine on your machine OMG I am in trouble now that s mean the problem is more than code now! Selenium opens firefox window what it sets on default firefox.My aim for using firefox profile is that Selenium can open webdriver more quicker and do not create temp profile instance file in temp folder.
    – digging
    Nov 7 at 9:20










  • maybe you have multiple test profile, check in profile dir or create other profile with unique name
    – ewwink
    Nov 7 at 9:27


















test your profile, run command or create shortcut with Target "<your_dir>firefox.exe" -P test -no-remote
– ewwink
Nov 7 at 8:30






test your profile, run command or create shortcut with Target "<your_dir>firefox.exe" -P test -no-remote
– ewwink
Nov 7 at 8:30














Thanks for helping @ewwink what shoul i see when run this command? It opens a new firefox window.
– digging
Nov 7 at 9:06




Thanks for helping @ewwink what shoul i see when run this command? It opens a new firefox window.
– digging
Nov 7 at 9:06












it should open firefox with test profile, it is returned firefox with expected profile? FYI, your code is fine it open selected profile in my windows
– ewwink
Nov 7 at 9:10




it should open firefox with test profile, it is returned firefox with expected profile? FYI, your code is fine it open selected profile in my windows
– ewwink
Nov 7 at 9:10












OMG! Code is fine and works fine on your machine OMG I am in trouble now that s mean the problem is more than code now! Selenium opens firefox window what it sets on default firefox.My aim for using firefox profile is that Selenium can open webdriver more quicker and do not create temp profile instance file in temp folder.
– digging
Nov 7 at 9:20




OMG! Code is fine and works fine on your machine OMG I am in trouble now that s mean the problem is more than code now! Selenium opens firefox window what it sets on default firefox.My aim for using firefox profile is that Selenium can open webdriver more quicker and do not create temp profile instance file in temp folder.
– digging
Nov 7 at 9:20












maybe you have multiple test profile, check in profile dir or create other profile with unique name
– ewwink
Nov 7 at 9:27






maybe you have multiple test profile, check in profile dir or create other profile with unique name
– ewwink
Nov 7 at 9:27



















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53185341%2fpython-firefox-selenium-load-profile%23new-answer', 'question_page');
}
);

Post as a guest





































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53185341%2fpython-firefox-selenium-load-profile%23new-answer', 'question_page');
}
);

Post as a guest




















































































這個網誌中的熱門文章

Xamarin.form Move up view when keyboard appear

Post-Redirect-Get with Spring WebFlux and Thymeleaf

Anylogic : not able to use stopDelay()