Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I have created a simple test that launches browser and calls a URL. This works fine in IE but when I select Firefox (FF) browser it opens blank. See the code snippet below.

The issue is similar to this post Post that concludes one has to change the settings in about:config's toolkit.telemetry.prompted to 2. But in my case its already 2, hence I have posted the issue.

Any help would be appreciated.

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.server.SeleniumServer;
import org.testng.annotations.AfterSuite;
import org.testng.annotations.BeforeSuite;

import com.thoughtworks.selenium.*;

public class BascOne  extends SeleneseTestBase {
    private SeleniumServer seleniumserver;

    //start the selenium server
    @Before
    public    void startServer()
    {
        try {


        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }


    @Test
    public void launchTest() throws Exception
    {
        seleniumserver = new SeleniumServer();

        seleniumserver.start();


        setUp("http://yahoo.com/", "firefox");
        selenium.windowMaximize();
        selenium.windowFocus();


        System.out.println("IN THE  TEST METHOD");

        selenium.open("http://yahoo.com/");    

        System.out.println("BEFORE WAIT");        

        if(selenium != null){
            System.out.println("Is there any exception");
            try {
                System.out.println("In the try block");

                selenium.close();
                selenium.shutDownSeleniumServer();        


            } catch(Exception exp) {
                System.out.println("Shutdown exception: " + exp.getMessage());
            }

        }

    }


    @After
    public void tearDown()  {
    }    
}
share|improve this question
1  
May I suggest to use WebDriver APIs (aka Selenium 2) if you have begun with Selenium? –  Tarun Nov 15 '12 at 5:33
    
On a side, how does it compile if in startServer() has no block throwing exception? –  dzieciou Nov 15 '12 at 7:00
    
I am also facing same issue. but when i run program using JUnit it runs successfully and with TestNG FF shows blank screen. Please help –  user4442 Nov 27 '12 at 6:47

3 Answers 3

up vote 2 down vote accepted

This is because of compatibility issue with your browser and Selenium libs. Selenium libs 2.16 supports Firefox version 3.6 to 11, and for 12 you have to upgrade your Selenium libs to 2.22.

share|improve this answer

I had a similar issue and found the problem was the combination of firefox version and selenium server version. You could try either downgrading firefox or upgrading selenium to the latest version.

Check out http://seleniumhq.org/about/platforms.html#browsers browsers supported in the latest versions, note that the latest version only supports up to firefox 10 at the moment...

share|improve this answer
    
yes, I did downgrade to 3.6(was using that earlier) & it works. based on the link that u sent, will try v 10 & see if that helps as well. –  Tahir Shabbir May 29 '12 at 6:41
1  
No, I face the same issue. Get message from FF when it launches - Will you help FF by sending anonymous information about performance, hardware characteristics ...... to mozilla. And 2 options : Yes, I want to help or no. After clicking on either of them I am not able to proceed anywhere. –  Tahir Shabbir May 29 '12 at 7:01

Hi i am gating error where is my system config is os 7 64 bit selenium java 2.44 selenium server standalone 2.44.0 Firefox 36.0.4 jdk8 jUnit 4.12 error is org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: G startup 1427455284797 addons.xpi INFO Mapping fxdriver@googlecode.com to C:\Users\Admin\AppData\Local\Temp\anonymous48167797335133806webdriver-profile\extensions\fxdriver@googlecode.com 1427455284797 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: C:\Users\Admin\AppData\Local\Temp\anonymous48167797335133806webdriver-profile\extensions\webdriver-staging 1427455284799 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to C:\Program Files (x86)\Mozilla Firefox\browser\extensions{972ce4c6-7e08-4474-a285-3208198ce6fd} 1427455284799 addons.xpi DEBUG Skipping unavailable install location app-system-share 1427455284800 addons.xpi DEBUG Skipping unavailable install location app-system-local 1427455284800 addons.xpi INFO Mapping {4ED1F68A-5463-4931-9384-8FFF5ED91D92} to C:\Program Files (x86)\McAfee\SiteAdvisor 1427455284800 addons.xpi DEBUG checkForChanges 1427455284801 addons.xpi DEBUG Loaded add-on state from prefs: {"app-profile":{"fxdriver@googlecode.com":{"d":"C:\Users\Admin\AppData\Local\Temp\anonymous48167797335133806webdriver-profile\extensions\fxdriver@googlecode.com","e":true,"v":"2.44.0","st":1427455278491,"mt":1427455278463}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"36.0.4","st":1427177685774,"mt":1426913063000}},"winreg-app-global":{"{4ED1F68A-5463-4931-9384-8FFF5ED91D92}":{"d":"C:\Program Files (x86)\McAfee\SiteAdvisor","e":false,"v":"3.7.2","st":1427440702658,"mt":1422438914000}}} 1427455284802 addons.xpi DEBUG getModTime: Recursive scan of fxdriver@googlecode.com 1427455284812 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd} 1427455284813 addons.xpi DEBUG getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"C:\Users\Admin\AppData\Local\Temp\anonymous48167797335133806webdriver-profile\extensions\fxdriver@googlecode.com","e":true,"v":"2.44.0","st":1427455278491,"mt":1427455278463}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"36.0.4","st":1427177685774,"mt":1426913063000}},"winreg-app-global":{"{4ED1F68A-5463-4931-9384-8FFF5ED91D92}":{"d":"C:\Program Files (x86)\McAfee\SiteAdvisor","e":false,"v":"3.7.2","st":1427440702658,"mt":1422438914000}}} 1427455284816 addons.xpi DEBUG No changes found 1427455284820 addons.manager DEBUG Registering shutdown blocker for XPIProvider 1427455284820 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager 1427455284822 addons.manager DEBUG Registering shutdown blocker for OpenH264Provider 1427455284822 addons.manager DEBUG Registering shutdown blocker for PluginProvider JavaScript error: file:///C:/Users/Admin/AppData/Local/Temp/anonymous48167797335133806webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js, line 11487: TypeError: this.server_ is undefined JavaScript error: chrome://fxdriver/content/server.js, line 38: NS_ERROR_XPC_CI_RETURNED_FAILURE: Component returned failure code: 0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.createInstance] *** Blocklist::_preloadBlocklistFile: blocklist is disabled 1427455286953 addons.manager DEBUG Registering shutdown blocker for 1427455317860 addons.manager DEBUG shutdown 1427455317861 addons.manager DEBUG Calling shutdown blocker for XPIProvider 1427455317861 addons.xpi DEBUG shutdown 1427455317861 addons.xpi DEBUG Notifying XPI shutdown observers 1427455317862 addons.manager DEBUG Calling shutdown blocker for LightweightThemeManager 1427455317863 addons.manager DEBUG Calling shutdown blocker for OpenH264Provider 1427455317865 addons.manager DEBUG Calling shutdown blocker for PluginProvider 1427455317866 addons.manager DEBUG Calling shutdown blocker for 1427455317871 addons.manager DEBUG Async provider shutdown done

at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95)
at mypac.mycla.main(mycla.java:11)

Exception in thread "main" org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7055; process output follows: G startup 1427455284797 addons.xpi INFO Mapping fxdriver@googlecode.com to C:\Users\Admin\AppData\Local\Temp\anonymous48167797335133806webdriver-profile\extensions\fxdriver@googlecode.com 1427455284797 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: C:\Users\Admin\AppData\Local\Temp\anonymous48167797335133806webdriver-profile\extensions\webdriver-staging 1427455284799 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to C:\Program Files (x86)\Mozilla Firefox\browser\extensions{972ce4c6-7e08-4474-a285-3208198ce6fd} 1427455284799 addons.xpi DEBUG Skipping unavailable install location app-system-share 1427455284800 addons.xpi DEBUG Skipping unavailable install location app-system-local 1427455284800 addons.xpi INFO Mapping {4ED1F68A-5463-4931-9384-8FFF5ED91D92} to C:\Program Files (x86)\McAfee\SiteAdvisor 1427455284800 addons.xpi DEBUG checkForChanges 1427455284801 addons.xpi DEBUG Loaded add-on state from prefs: {"app-profile":{"fxdriver@googlecode.com":{"d":"C:\Users\Admin\AppData\Local\Temp\anonymous48167797335133806webdriver-profile\extensions\fxdriver@googlecode.com","e":true,"v":"2.44.0","st":1427455278491,"mt":1427455278463}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"36.0.4","st":1427177685774,"mt":1426913063000}},"winreg-app-global":{"{4ED1F68A-5463-4931-9384-8FFF5ED91D92}":{"d":"C:\Program Files (x86)\McAfee\SiteAdvisor","e":false,"v":"3.7.2","st":1427440702658,"mt":1422438914000}}} 1427455284802 addons.xpi DEBUG getModTime: Recursive scan of fxdriver@googlecode.com 1427455284812 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd} 1427455284813 addons.xpi DEBUG getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"C:\Users\Admin\AppData\Local\Temp\anonymous48167797335133806webdriver-profile\extensions\fxdriver@googlecode.com","e":true,"v":"2.44.0","st":1427455278491,"mt":1427455278463}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"36.0.4","st":1427177685774,"mt":1426913063000}},"winreg-app-global":{"{4ED1F68A-5463-4931-9384-8FFF5ED91D92}":{"d":"C:\Program Files (x86)\McAfee\SiteAdvisor","e":false,"v":"3.7.2","st":1427440702658,"mt":1422438914000}}} 1427455284816 addons.xpi DEBUG No changes found 1427455284820 addons.manager DEBUG Registering shutdown blocker for XPIProvider 1427455284820 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager 1427455284822 addons.manager DEBUG Registering shutdown blocker for OpenH264Provider 1427455284822 addons.manager DEBUG Registering shutdown blocker for PluginProvider JavaScript error: file:///C:/Users/Admin/AppData/Local/Temp/anonymous48167797335133806webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js, line 11487: TypeError: this.server_ is undefined JavaScript error: chrome://fxdriver/content/server.js, line 38: NS_ERROR_XPC_CI_RETURNED_FAILURE: Component returned failure code: 0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.createInstance] *** Blocklist::_preloadBlocklistFile: blocklist is disabled 1427455286953 addons.manager DEBUG Registering shutdown blocker for 1427455317860 addons.manager DEBUG shutdown 1427455317861 addons.manager DEBUG Calling shutdown blocker for XPIProvider 1427455317861 addons.xpi DEBUG shutdown 1427455317861 addons.xpi DEBUG Notifying XPI shutdown observers 1427455317862 addons.manager DEBUG Calling shutdown blocker for LightweightThemeManager 1427455317863 addons.manager DEBUG Calling shutdown blocker for OpenH264Provider 1427455317865 addons.manager DEBUG Calling shutdown blocker for PluginProvider 1427455317866 addons.manager DEBUG Calling shutdown blocker for 1427455317871 addons.manager DEBUG Async provider shutdown done

Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:03:00' System info: host: 'Admin-PC', ip: '192.168.0.106', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_31' Driver info: driver.version: FirefoxDriver at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:130) at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:114) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:193) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:186) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:182) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:95) at mypac.mycla.main(mycla.java:11) Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: G startup 1427455284797 addons.xpi INFO Mapping fxdriver@googlecode.com to C:\Users\Admin\AppData\Local\Temp\anonymous48167797335133806webdriver-profile\extensions\fxdriver@googlecode.com 1427455284797 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: C:\Users\Admin\AppData\Local\Temp\anonymous48167797335133806webdriver-profile\extensions\webdriver-staging 1427455284799 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to C:\Program Files (x86)\Mozilla Firefox\browser\extensions{972ce4c6-7e08-4474-a285-3208198ce6fd} 1427455284799 addons.xpi DEBUG Skipping unavailable install location app-system-share 1427455284800 addons.xpi DEBUG Skipping unavailable install location app-system-local 1427455284800 addons.xpi INFO Mapping {4ED1F68A-5463-4931-9384-8FFF5ED91D92} to C:\Program Files (x86)\McAfee\SiteAdvisor 1427455284800 addons.xpi DEBUG checkForChanges 1427455284801 addons.xpi DEBUG Loaded add-on state from prefs: {"app-profile":{"fxdriver@googlecode.com":{"d":"C:\Users\Admin\AppData\Local\Temp\anonymous48167797335133806webdriver-profile\extensions\fxdriver@googlecode.com","e":true,"v":"2.44.0","st":1427455278491,"mt":1427455278463}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"36.0.4","st":1427177685774,"mt":1426913063000}},"winreg-app-global":{"{4ED1F68A-5463-4931-9384-8FFF5ED91D92}":{"d":"C:\Program Files (x86)\McAfee\SiteAdvisor","e":false,"v":"3.7.2","st":1427440702658,"mt":1422438914000}}} 1427455284802 addons.xpi DEBUG getModTime: Recursive scan of fxdriver@googlecode.com 1427455284812 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd} 1427455284813 addons.xpi DEBUG getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"C:\Users\Admin\AppData\Local\Temp\anonymous48167797335133806webdriver-profile\extensions\fxdriver@googlecode.com","e":true,"v":"2.44.0","st":1427455278491,"mt":1427455278463}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"36.0.4","st":1427177685774,"mt":1426913063000}},"winreg-app-global":{"{4ED1F68A-5463-4931-9384-8FFF5ED91D92}":{"d":"C:\Program Files (x86)\McAfee\SiteAdvisor","e":false,"v":"3.7.2","st":1427440702658,"mt":1422438914000}}} 1427455284816 addons.xpi DEBUG No changes found 1427455284820 addons.manager DEBUG Registering shutdown blocker for XPIProvider 1427455284820 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager 1427455284822 addons.manager DEBUG Registering shutdown blocker for OpenH264Provider 1427455284822 addons.manager DEBUG Registering shutdown blocker for PluginProvider JavaScript error: file:///C:/Users/Admin/AppData/Local/Temp/anonymous48167797335133806webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js, line 11487: TypeError: this.server_ is undefined JavaScript error: chrome://fxdriver/content/server.js, line 38: NS_ERROR_XPC_CI_RETURNED_FAILURE: Component returned failure code: 0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.createInstance] *** Blocklist::_preloadBlocklistFile: blocklist is disabled 1427455286953 addons.manager DEBUG Registering shutdown blocker for 1427455317860 addons.manager DEBUG shutdown 1427455317861 addons.manager DEBUG Calling shutdown blocker for XPIProvider 1427455317861 addons.xpi DEBUG shutdown 1427455317861 addons.xpi DEBUG Notifying XPI shutdown observers 1427455317862 addons.manager DEBUG Calling shutdown blocker for LightweightThemeManager 1427455317863 addons.manager DEBUG Calling shutdown blocker for OpenH264Provider 1427455317865 addons.manager DEBUG Calling shutdown blocker for PluginProvider 1427455317866 addons.manager DEBUG Calling shutdown blocker for 1427455317871 addons.manager DEBUG Async provider shutdown done

at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
... 7 more
share|improve this answer
    
This should be a separate question, with more information. You can link it to the question you posted under. –  Kate Paulk 11 hours ago
    
If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. –  PaulDonny 7 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.