My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  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 ivo...@gmail.com, 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", "http://www.nu.nl");
	    profile.setPreference("browser.download.dir", "c:\\Selenium\\TestData");

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

	    WebDriver driver = new RemoteWebDriver(new URL("http://127.0.0.1:4444/wd/hub" caps);
	    
	    String title = driver.getTitle();
	    driver.quit();

	    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 www.nu.nl 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 CopyProfileTest.java which also opens 2 tabs.
Apr 19, 2011
#1 ivo...@gmail.com
 Issue 1555  is related although .Net also has a profile serialize problem
Apr 20, 2011
#2 ivo...@gmail.com
adding:

profile.setPreference("browser.download.folderList", 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 jmle...@gmail.com
(No comment was entered for this change.)
Labels: Component-WebDriver Browser-Firefox
May 16, 2011
Project Member #4 francois.reynaud@gmail.com
seems to be a problem with the regex checking that the prefs are valid.
Before regex ( r11931 )
startup.homepage_welcome_url="http://localhost:8422/common/xhtmlTest.html
after ( using the regex + match )
startup.homepage_welcome_url=http://localhost:8422/common/xhtmlTest.html
quotes are gone. Adding them manually solved the issue.

May 17, 2011
#5 de...@spathi.com
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.
quoted_preferences.patch
1.5 KB   View   Download
May 23, 2011
#6 ivo...@gmail.com
After r12229 and r12230 setting profile properties like browser.download.dir works again but profile.setPreference("browser.startup.homepage", "http://www.nu.nl"); 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);
or
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