Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (19.7k points)

I try to run Nunit_selenium automation in updated firefox version,

vs 13,

selenium webdriver 3.8.0




Firefox launched but driver url link not updated

issue :in firefox notrun_image

please find the below code : . . . . . . . /

namespace SanityTesting


    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    using System.Threading.Tasks;

    using NUnit.Framework.Constraints;

    using NUnit.Framework;

    using NUnit.Core.Extensions;

    using System.Configuration;

    using System.IO;

    using System.Reflection;

    using OpenQA.Selenium.Interactions;

    using OpenQA.Selenium;

    using Syncfusion.UnitTesting.Framework;

    using OpenQA.Selenium.Remote;

    using System.Threading;

    using OpenQA.Selenium.Support.UI;

    using System.Collections;

    using OpenQA.Selenium.Firefox;

    using System.Diagnostics;

    using System.Globalization;

    using System.Drawing;

    using SanityTesting.AccordionFluent;

    using System.Windows.Forms;



    public class EmberJS_Accordion : NUnitUtil


        string activeBrowser;

        public EmberJS_Accordion(string browser)


            FirefoxDriverService service = FirefoxDriverService.CreateDefaultService(@"C:\Drivers");

            service.FirefoxBinaryPath = @"C:\Program Files (x86)\Mozilla Firefox\firefox.exe";          

            System.Environment.SetEnvironmentVariable("webdriver.gecko.driver", "C:\\Drivers\\geckodriver.exe");

            FirefoxDriver driver = new FirefoxDriver(service); //    FirefoxDriver driver = new FirefoxDriver(); 

            //driver = GetWebDriverForBrowser(browser);    

            //FirefoxProfile profile = new FirefoxProfile();

            //profile.SetPreference("", 0); // Empty start page

            //profile.SetPreference("browser.startup.homepage_override.mstone", "ignore"); // Suppress the "What's new" page

           // return new FirefoxDriver(profile);

            activeBrowser = browser;           



        public void quitDriver()




        public void TakeAndCompareScreenshotByLocator(By Locator, string fileName)


            IWebElement contents = driver.FindElementAfterClickable(Locator);

            TakeAndCompareScreenshot(contents, fileName);


        [Test, TestCaseSource(typeof(AccordionModel), "Sanity_Accordion")]



        public void EmberJS_Accordion_Sanity(string url, int time)


            AutomationHelpers.GotoPage(driver, url);


            driver.WaitForElementClickable(By.CssSelector(".e-acrdn"), time);


            IWebElement contents = driver.FindElement(By.ClassName("cols-sample-area"));




1 Answer

0 votes
by (62.9k points)

Change the following line of code,

FirefoxDriver driver = new FirefoxDriver(service);


driver = new FirefoxDriver(service);

Let me know that is your NUnitUtil class have driver member variable. if yes, then above code may work.

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94.6k users

Browse Categories