My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 1579: Setting browser.startup.homepage in firefox profile causes 2 firefox tabs to open
7 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Feb 2012

Sign in to add a comment
Reported by, Apr 19, 2011
What steps will reproduce the problem?
1. Start RC
2. Run test below

	public void testSettingDownloadDir() throws Exception
	    FirefoxProfile profile = new FirefoxProfile();
	    profile.setPreference("browser.startup.homepage", "");
	    profile.setPreference("", "c:\\Selenium\\TestData");

	    DesiredCapabilities caps = DesiredCapabilities.firefox();
	    caps.setCapability(PROFILE, profile);

	    WebDriver driver = new RemoteWebDriver(new URL("" caps);
	    String title = driver.getTitle();

	    assertEquals(title, "XHTML Test Page", title);

What is the expected output? What do you see instead?

Expected is a firefox browser opening 1 tab startpage should be and when going to firefox options 'Save files to' should read: c:\Selenium\TestData

Instead firefox is openend with two tabs, startpage is set correct but download dir remains the default download dir.

What version of the product are you using? On what operating system?

trunk revision 12047 ( between b3 and b4 )
using firefox 4  ( same behaviour with 3.6 )

Please provide any additional information below.

Using the firefox driver directly behaves as expected.
This test is copied and modified from testShouldCopyProfileFromLocalMachineToRemoteInstance in which also opens 2 tabs.
Apr 19, 2011
 Issue 1555  is related although .Net also has a profile serialize problem
Apr 20, 2011

profile.setPreference("", 2);

fixed the download dir setting problem. However when also setting the homepage there are still 2 tabs openened.
Apr 20, 2011
Project Member #3
(No comment was entered for this change.)
Labels: Component-WebDriver Browser-Firefox
May 16, 2011
Project Member #4
seems to be a problem with the regex checking that the prefs are valid.
Before regex ( r11931 )
after ( using the regex + match )
quotes are gone. Adding them manually solved the issue.

May 17, 2011
Attached is a patch that changes the regex to capture quotes (if present).
I have also updated the test to check that strings are returned in quotes.
1.5 KB   View   Download
May 23, 2011
After r12229 and r12230 setting profile properties like works again but profile.setPreference("browser.startup.homepage", ""); still leads to two tabs being openened.
Nov 20, 2011
Project Member #7 barancev
Checked with FF8 and Se 2.12 -- the issue is still actual.

But my experiment says that the remaining part (two tabs) is not related to RemoteWebDriver. I've got two tabs also in the following two cases:

WebDriver driver = new FirefoxDriver(caps);
WebDriver driver = new FirefoxDriver(profile);
Nov 20, 2011
Project Member #8 barancev
(No comment was entered for this change.)
Summary: Setting browser.startup.homepage in firefox profile causes 2 firefox tabs to open
Feb 24, 2012
Project Member #9 simon.m.stewart
This issue was closed by revision r15987.
Status: Fixed
Sign in to add a comment

Powered by Google Project Hosting