Selenium Firefox Pop-up blocker leads to fail the test case execution
We are using the selenium with firefox webdriver to automate all our test cases.
I'm automating the SDL Tridion manual activities like Creating a Component, Creating a Page, Tridion out-of box search etc....
When I run the test cases for Page Creation test case, Firefox's pop up blocker ending up blocking the window that is supposed to open. This leads to failing the test case, but for other test cases it is working fine(FYI : I'm running it from my local)
On the top of this selenium project we have built one asp.net web application and the application has been configured in the IIS Successfully. When I run this project by hitting the server URL, All the test cases got executed successfully.(Note: No Firefox pop-up blocker issue) But we couln't execute the selenium project from our local, because of the firefox driver pop-up blocker issue.
I have tried a couple of things but they didn't work out, And those are mentioned here 1. Given the URL of the site in the firefox setting's(Options->Content->Add Exceptions->URL of the Site) 2. Setting the preference in the firefox profile like below
public void Init()
//driver = new FirefoxDriver();
//FirefoxBinary fb = new FirefoxBinary(@ConfigurationManager.AppSettings["FirefoxBinaryLocation"]);
FirefoxBinary fb = new FirefoxBinary(@ConfigurationManager.AppSettings["FirefoxBinaryLocation"]);
FirefoxProfile fp = new FirefoxProfile();
driver = new FirefoxDriver(fb, fp);
catch (System.Exception ex)
logger.WriteError("Exception in instantiating Firefox driver : " + ex.Message);
IwebElement element = driver.findelement(By.Id("Id name goes here"))
Hope this might helpful to others.
Asked in February 2016Viewed 3,680 timesVoted 11Answered 2 times