c# - Selenium not running when using [TestFixture(typeof(ChromerDriver))] -


so i've gone basics blank project test out, i'm trying use example...

[testfixture(typeof(chromedriver))] public class testwithmultiplebrowsers<twebdriver> twebdriver : iwebdriver, new() {     private iwebdriver driver;      [setup]     public void createdriver()     {         this.driver = new twebdriver();     }      [test]     public void googletest()     {         driver.navigate().gotourl("http://www.google.com/");         iwebelement query = driver.findelement(by.name("q"));         query.sendkeys("bread" + keys.enter);          thread.sleep(2000);          assert.areequal("bread - google search", driver.title);         driver.quit();     } }  

however not run. if remove testfixture typeof parameter though , set driver manually works fine.

[testfixture] public class testwithmultiplebrowsers {     private iwebdriver driver;      [setup]     public void createdriver()     {         this.driver = new chromedriver();     }      [test]     public void googletest()     {         driver.navigate().gotourl("http://www.google.com/");         iwebelement query = driver.findelement(by.name("q"));         query.sendkeys("bread" + keys.enter);          thread.sleep(2000);          assert.areequal("bread - google search", driver.title);         driver.quit();     } }  

any ideas on why using textfixture parameter prevent test running? i've checked on cpu settings , resharper settings based on other posts.

many thanks

after comparing nuget packages old project looks there may issue recent version of nunit. downgraded 2.6.4 seems working fine.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

python - pip wont install .WHL files -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -