Secure Connection Failed

989 views
Skip to first unread message

Anam Akhtar

unread,
Nov 15, 2011, 7:27:31 AM11/15/11
to Selenium - Automated Software Testing
I am having a problem in executing my test with converted Junit
WebDriver Backed. When I execute this test by java file its stopped on
the first screen and after few seconds it shows me this error "Secure
Connection Failed " the website is running over https, when I execute
the code from Selenium IDE it works correctly. Any help would be
really appreciated.

Walter Gorlitz

unread,
Nov 21, 2011, 10:53:39 AM11/21/11
to selenium-...@googlegroups.com
Does the site have a valid certificate? It could be trying to inform you that the certificate is not recognized.
When I ran my first tests in Firefox it worked when recording but then failed when playing back after scripting. I had to launch Firefox with profilemanager and add an exception for the domain under test. After that, I was able to run the tests successfully. Don't forget to run profilemanager again afterwards to select your default profile.

Walter


--
You received this message because you are subscribed to the Google Groups "Selenium - Automated Software Testing" group.
To post to this group, send email to selenium-...@googlegroups.com.
To unsubscribe from this group, send email to selenium-test-t...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-test-tool?hl=en.


Veera mani

unread,
Nov 20, 2011, 11:35:39 PM11/20/11
to selenium-...@googlegroups.com
Hi,

You need to add a parameter while starting your selenium server.

java -jar selenium-server-standalone-2.2.0.jar -trustAllSSLCertificates

Refer this blog for more info:

http://veera-seleniumsupport.blogspot.com/2011/11/handling-certificate-errors-on-fireofx.html

Regards
VEERA

Gurdarshan Singh

unread,
Nov 21, 2011, 12:51:52 AM11/21/11
to Selenium - Automated Software Testing
Hi Akhtar,

Please try if you are running your script in firefox:

FirefoxProfile firefoxProfile = new FirefoxProfile();
firefoxProfile.setAssumeUntrustedCertificateIssuer(false);
Webdriver driver = new FirefoxDriver(firefoxProfile);

~Gurdarshan

Thiago Alessandro

unread,
Nov 22, 2011, 9:02:45 AM11/22/11
to Selenium - Automated Software Testing
Friends,

I am having the same problem, but i use Selenium WebDriver .NET with
CSharp and NUnit.
I created a code with FirefoxProfileManager, but the problem remains.
When I ran the tests, the certificate is not recognized.
Can anybody help me?

Code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using NUnit.Framework;
using Selenium;
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.IE;
using OpenQA.Selenium.Chrome;

namespace AutomacaoWalmartB2B.Home.Config
{
[TestFixture]
class ConfigSelenium
{
public static ISelenium selenium;
private IWebDriver driver;
public static String IP_SERVER = "qa.site.walmart.com.br";


[SetUp]
public void SetupTest()
{
#region Definition of the Firefox profile to avoid
certificate errors

FirefoxProfileManager profileManager = new
FirefoxProfileManager();
FirefoxProfile profile =
profileManager.GetProfile("automacaoWalmart");

#endregion

String servidor = "http://" + IP_SERVER + "/";
driver = new FirefoxDriver(profile);
selenium = new WebDriverBackedSelenium(driver, servidor);
selenium.Start();
selenium.WindowMaximize();
}

[TearDown]
public void TeardownTest()
{
//driver.Quit();
}

}

}

Thanks

Thiago Alessandro
Sao Paulo, Brazil

On 21 nov, 13:53, Walter Gorlitz <wal...@gorlitz.ca> wrote:
> Does the site have a valid certificate? It could be trying to inform you
> that the certificate is not recognized.
> When I ran my first tests in Firefox it worked when recording but then
> failed when playing back after scripting. I had to launch Firefox with
> profilemanager and add an exception for the domain under test. After that,
> I was able to run the tests successfully. Don't forget to run
> profilemanager again afterwards to select your default profile.
>
> Walter
>

Walter Gorlitz

unread,
Nov 22, 2011, 9:22:22 PM11/22/11
to selenium-...@googlegroups.com
Are you doing it in the Selenium profile?

Walter
Reply all
Reply to author
Forward
0 new messages