how to handle Untrusted Connection Error in selenium RC for C#
I am writing my test cases in C#. When I am trying to run them, FF generates an untrusted connection error. 开发者_StackOverflow中文版I tried to add new profile, to add in about:config "accept.all.certs = true" value, also I tried to disable use online certificate status protocal. But every time when I run again my test cases, it seems to "forget" all changes that I have done.
You will have to create a dedicated FF/Selenium profile. Here is a post to get you started. Once created, ensure that you save the exception (accepting the untrusted connection) within the profile.
Once done, you can invoke FF in your scripts using the custom profile as follows
RemoteControlConfiguration settings = new RemoteControlConfiguration();
File f = new File("C:\\selenium-profile"); //Path of your stored custom profile
settings.setFirefoxProfileTemplate(f);
SeleniumServer seleniumserver=new SeleniumServer(settings);
seleniumserver.boot();
seleniumserver.start();
This is in Java, but can be adapted to C#
精彩评论