Thursday, December 31, 2009

Share the ideas about programming

New year's resolution? Yes..

It is a very fortunate thing that you are doing what you like to do everyday. If your job is doing what you are passionate about, you are absolutely a successful man. I'm a Software Test Engineer or Software Development Engineer in Test. Whatever it is I love what I'm doing everyday at work. I get excited when I put my finger on the keyboard.

Then what is my resolution for this year?

I like to share ideas with the world about solving programmatic problems. Nothing fantastic about this. Any topic. Testing, Algorithm, Data structure, Design patterns, puzzles whatever. I'll try and see how this will looks like on next new year's day.

Today?
Some problem I recently solved by searching internet.

Starting a Selenium server with Firefox profile to get around certificate issue:
The problem was:
"When I run a selenium test against test machine within a network, Firefox keep asking for certificate."

Here is the solution
1. start a firefox with -profileManager (i.e. c:/>firefox -ProfileManager)
2. create a new profile and start the firefox
3. go to any https://..... page on test machine which requires the certificate.
4. close the firefox and go to profile page which is located something like "user/Application Data/Mozilla/Firefox/profiles ...."
5. go to newly created profile folder and copy cert_override.txt and cert8.db to certain folder (i.e. c:/testMachine1Certs)
6. Start Selenium server with following code

RemoteControlConfiguration rcc = new RemoteControlConfiguration();
rcc.setFirefoxProfileTemplate(new File("c:\\testMachineCerts"));
server = new SeleniumServer(rcc);
server.start();

7. Now you don't have certificate problem any more~~



1 comment:

Anonymous said...

keep posting these informative articles.