Tuesday, October 18, 2011

Run https site with Selenium, C#.Net and Firefox 3.5.3

1) Open the Windows "Start" menu, select "Run", then type and enter one of the following:

firefox.exe -profilemanager

2) Create a new profile (e.g. selenium-https-profile) and work with this profile.

3) Open your application manually and accept the certificate permanently with the newly created profile (i.e. selenium-https-profile) and hit the ok button.

4) Run the Selenium RC server with -firefoxProfileTemplate option and specify the path.

java -jar selenium-server.jar –firefoxProfileTemplate "C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\gmkxzvfb.selenium-https-profile"

5) Go to SetupTest() function in your designed C# Code and Start Selenium server with following code:

selenium = new DefaultSelenium("localhost", 4444, "*firefox", "https://www.xxx.com/");

6) Run The Test from C#.NET.

No comments:

Post a Comment