1

I have implemented alannings example from the below link: , however, as each test runs, they all come back with GoogleTest as there name.I would like ot be able to get each result append with the browser it ran in. What would be the best approach

Run Selenium tests in multiple browsers one after another from C# NUnit

using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.IE;
using OpenQA.Selenium.Chrome;
using System.Threading;
using NUnit.Framework;
using OpenQA.Selenium.Support.UI;



namespace UnitTestProject1
{
    [TestFixture(typeof(FirefoxDriver))]
    [TestFixture(typeof(InternetExplorerDriver))]
    [TestFixture(typeof(ChromeDriver))]

    public class agentLogin<TWebDriver> where TWebDriver : IWebDriver, new()
    {
        private IWebDriver driver;

        [SetUp]
        public void CreateDriver () {

           this.driver = new TWebDriver();
        }

        [Test]
        public void agentLogin_Smoke() {
            driver.Url = "http://dev.URL.com/Login/Index.aspx";
            Assert.IsTrue(driver.FindElement(By.Id("lblHeader")).Displayed);

            //Agent Login name
            var agentLogin = driver.FindElement(By.Id("tbLoginName"));
            agentLogin.Clear();
            agentLogin.SendKeys("userID");
Community
  • 1
  • 1
Joe Early
  • 108
  • 5
  • 20

0 Answers0