How to set Firefox Profile: Selenium RC, .Net Client Driver?

后端 未结 2 1452
春和景丽
春和景丽 2021-02-11 06:11

I\'m using Selenium RC + .Net Client Driver. I\'ve created a Firefox profile in my c:\\selenium\\ directory. Here\'s my code:

Dim MySelenium As ISelenium = Nothi         


        
2条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-11 06:27

    In Java you can create the Selenium Server programmatically and pass a File as the newFirefoxProfileTemplate configuration property:

    RemoteControlConfiguration rcc = new RemoteControlConfiguration();
    rcc.setPort(5499);
    rcc.setFirefoxProfileTemplate(newFirefoxProfileTemplate); // This is a File object
    SeleniumServer server = new SeleniumServer(rcc);
    
    server.start();
    

    Perhaps there are similar (or the same) vb.net classes available.

提交回复
热议问题