SSL certification problem in Chrome

2,530 views
Skip to first unread message

Tulsi tester

unread,
Mar 15, 2012, 10:59:08 AM3/15/12
to Digest Recipients
Hi All,

I am running my selenium RC scrips on Google chrome. I am facing problem in SSL certificates. When I open manually the same site which is https, it is not showing any message. But when running it shows. Any work around on this.
SSL.jpg

Oscar Rieken

unread,
Mar 15, 2012, 11:06:09 AM3/15/12
to seleniu...@googlegroups.com
http://code.google.com/p/selenium/wiki/ChromeDriver 
from this page we can see this :

Starting Chromium with Specific Flags

The ChromeDriver can be made to start the browser with specific command line flags using the chrome.switches capability key; this key should define a list of command line flags that should be passed to the browser on start-up. For example, to start Chrome as a maximized window:

  DesiredCapabilities capabilities = DesiredCapabilities.chrome();
  capabilities
.setCapability("chrome.switches", Arrays.asList("--start-maximized"));
 
WebDriver driver = new ChromeDriver(capabilities);

Similarly, to load an extension when Chrome starts:

  DesiredCapabilities capabilities = DesiredCapabilities.chrome();
  capabilities
.setCapability("chrome.switches", Arrays.asList("--load-extension=/path/to/extension/directory"));
 
WebDriver driver = new ChromeDriver(capabilities);

Or to load with a specific profile (note that the default profile directories can be found here):

  DesiredCapabilities capabilities = DesiredCapabilities.chrome();
  capabilities
.setCapability("chrome.switches", Arrays.asList("--user-data-dir=/path/to/profile/directory"));
 
WebDriver driver = new ChromeDriver(capabilities);

The full list of flags can be found here.



On Thu, Mar 15, 2012 at 10:59 AM, Tulsi tester <tulsi....@gmail.com> wrote:
Hi All,

I am running my selenium RC scrips on Google chrome. I am facing problem in SSL certificates. When I open manually the same site which is https, it is not showing any message. But when running it shows. Any work around on this.

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

tulsi.tester

unread,
Mar 16, 2012, 1:28:04 AM3/16/12
to Selenium Users
Hi Oscar,

I am using Selenium RC , but not the webdriver. Do you have any idea
about how to configure chrome for the RC scripts.

On Mar 15, 11:06 am, Oscar Rieken <bis...@gmail.com> wrote:
> http://code.google.com/p/selenium/wiki/ChromeDriver
> from this page we can see this :
> Starting Chromium with Specific Flags
>
> The ChromeDriver can be made to start the browser with specific command
> line flags using the chrome.switches capability key; this key should define
> a list of command line flags that should be passed to the browser on
> start-up. For example, to start Chrome as a maximized window:
>
>   DesiredCapabilities capabilities = DesiredCapabilities.chrome();
>   capabilities.setCapability("chrome.switches",
> Arrays.asList("--start-maximized"));
>   WebDriver driver = new ChromeDriver(capabilities);
>
> Similarly, to load an extension when Chrome starts:
>
>   DesiredCapabilities capabilities = DesiredCapabilities.chrome();
>   capabilities.setCapability("chrome.switches",
> Arrays.asList("--load-extension=/path/to/extension/directory"));
>   WebDriver driver = new ChromeDriver(capabilities);
>
> Or to load with a specific profile (note that the default profile
> directories can be found
> here<http://www.chromium.org/user-experience/user-data-directory>):
>
>   DesiredCapabilities capabilities = DesiredCapabilities.chrome();
>   capabilities.setCapability("chrome.switches",
> Arrays.asList("--user-data-dir=/path/to/profile/directory"));
>   WebDriver driver = new ChromeDriver(capabilities);
>
> The full list of flags can be found
> here<http://peter.sh/experiments/chromium-command-line-switches/>.
>
> On Thu, Mar 15, 2012 at 10:59 AM, Tulsi tester <tulsi.tes...@gmail.com>wrote:
>
>
>
> > Hi All,
>
> > I am running my selenium RC scrips on Google chrome. I am facing problem
> > in SSL certificates. When I open manually the same site which is https, it
> > is not showing any message. But when running it shows. Any work around on
> > this.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Selenium Users" group.
> > To post to this group, send email to seleniu...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > selenium-user...@googlegroups.com.
> > For more options, visit this group at
> >http://groups.google.com/group/selenium-users?hl=en.- Hide quoted text -
>
> - Show quoted text -

raghu nandan

unread,
Mar 16, 2012, 1:34:15 AM3/16/12
to seleniu...@googlegroups.com
hope below may help you:change url & firefox to chrome

@BeforeClass
    public static void setupServer() throws Exception {
        RemoteControlConfiguration rc = new RemoteControlConfiguration();
        rc.setTrustAllSSLCertificates(true);
        seleniumServer = new SeleniumServer(rc);
        seleniumServer.start();
        selenium = new DefaultSelenium("localhost", 4444, "*firefox", "http://172.16.29.58:8180/tms/core/index_frameset");
        selenium.start();
        selenium.getEval("window.resizeTo(1024, 768); window.moveTo(100,100);");
--
with regards
RaghuNandan

kausamb mahapatra

unread,
Mar 16, 2012, 1:59:16 AM3/16/12
to seleniu...@googlegroups.com
can somebody tell about the framework folder structure in testng

tulsi.tester

unread,
Mar 17, 2012, 4:37:58 AM3/17/12
to Selenium Users
Hi Raghu,

I have tried this earlier. but unable to pass.
> > > >http://groups.google.com/group/selenium-users?hl=en.-Hide quoted text

tulsi.tester

unread,
Mar 28, 2012, 10:25:59 AM3/28/12
to Selenium Users
Hi Oscar,
Any update on this?

On Mar 15, 8:06 pm, Oscar Rieken <bis...@gmail.com> wrote:
> http://code.google.com/p/selenium/wiki/ChromeDriver
> from this page we can see this :
> Starting Chromium with Specific Flags
>
> The ChromeDriver can be made to start the browser with specific command
> line flags using the chrome.switches capability key; this key should define
> a list of command line flags that should be passed to the browser on
> start-up. For example, to start Chrome as a maximized window:
>
>   DesiredCapabilities capabilities = DesiredCapabilities.chrome();
>   capabilities.setCapability("chrome.switches",
> Arrays.asList("--start-maximized"));
>   WebDriver driver = new ChromeDriver(capabilities);
>
> Similarly, to load an extension when Chrome starts:
>
>   DesiredCapabilities capabilities = DesiredCapabilities.chrome();
>   capabilities.setCapability("chrome.switches",
> Arrays.asList("--load-extension=/path/to/extension/directory"));
>   WebDriver driver = new ChromeDriver(capabilities);
>
> Or to load with a specific profile (note that the default profile
> directories can be found
> here<http://www.chromium.org/user-experience/user-data-directory>):
>
>   DesiredCapabilities capabilities = DesiredCapabilities.chrome();
>   capabilities.setCapability("chrome.switches",
> Arrays.asList("--user-data-dir=/path/to/profile/directory"));
>   WebDriver driver = new ChromeDriver(capabilities);
>
> The full list of flags can be found
> here<http://peter.sh/experiments/chromium-command-line-switches/>.

tulsi.tester

unread,
Apr 2, 2012, 3:54:53 AM4/2/12
to Selenium Users
Hi All,

I found the solution. Please find the process here.

I have installed the cybervillainsCA certificate under TRUSTED ROOT
CERTIFICATION AUTHORITIES in google chrome. This can be done by the
following process.

1. Unzip selenium-server-standalone-2.20.0.zip file
2. Open settings in chrome.
3. Open Under the hood tab
4. Click on Manage certificates
5. Click on import
6. Click on Next
7. Browse the file cybervillainsCA ( which is in sslSupport of
unzipped folder of selenium server)
8. Click on Next
9. Select Place all certificates in the following store
10. Click on browse button
11. Selecte trust root certification authorities
12. click on next
13. click on finish and then ok.

On Mar 28, 7:25 pm, "tulsi.tester" <tulsi.tes...@gmail.com> wrote:
> Hi Oscar,
> Any update on this?
>
> On Mar 15, 8:06 pm, Oscar Rieken <bis...@gmail.com> wrote:
>
>
>
> >http://code.google.com/p/selenium/wiki/ChromeDriver
> > from this page we can see this :
> > Starting Chromium with Specific Flags
>
> > The ChromeDriver can be made to start the browser with specific command
> > line flags using thechrome.switches capability key; this key should define
> > a list of command line flags that should be passed to the browser on
> > start-up. For example, to startChromeas a maximized window:
>
> >   DesiredCapabilities capabilities = DesiredCapabilities.chrome();
> >   capabilities.setCapability("chrome.switches",
> > Arrays.asList("--start-maximized"));
> >   WebDriver driver = new ChromeDriver(capabilities);
>
> > Similarly, to load an extension whenChromestarts:
>
> >   DesiredCapabilities capabilities = DesiredCapabilities.chrome();
> >   capabilities.setCapability("chrome.switches",
> > Arrays.asList("--load-extension=/path/to/extension/directory"));
> >   WebDriver driver = new ChromeDriver(capabilities);
>
> > Or to load with a specific profile (note that the default profile
> > directories can be found
> > here<http://www.chromium.org/user-experience/user-data-directory>):
>
> >   DesiredCapabilities capabilities = DesiredCapabilities.chrome();
> >   capabilities.setCapability("chrome.switches",
> > Arrays.asList("--user-data-dir=/path/to/profile/directory"));
> >   WebDriver driver = new ChromeDriver(capabilities);
>
> > The full list of flags can be found
> > here<http://peter.sh/experiments/chromium-command-line-switches/>.
>
> > On Thu, Mar 15, 2012 at 10:59 AM, Tulsi tester <tulsi.tes...@gmail.com>wrote:
>
> > > Hi All,
>
> > > I am running my selenium RC scrips on Googlechrome. I am facingproblem
> > > inSSLcertificates. When I open manually the same site which is https, it
> > > is not showing any message. But when running it shows. Any work around on
> > > this.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Selenium Users" group.
> > > To post to this group, send email to seleniu...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > selenium-user...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/selenium-users?hl=en.- Hide quoted text -

Enix Shen

unread,
Apr 2, 2012, 4:01:30 AM4/2/12
to seleniu...@googlegroups.com
Try this option -trustAllSSLCertificates when you start up your selenium server

sirus

unread,
Apr 2, 2012, 12:05:02 PM4/2/12
to Selenium Users
Hi tulsi,

I'm not able to find the cybervillainsCA certificate under TRUSTED
ROOT CERTIFICATION AUTHORITIES in google chrome in the selenium 2.20.0
folder.
I only see selenium-standalone-server-2.20.0 jar file.

Can you help me to locate the file ?

Thanks

Sirus
> > > >http://groups.google.com/group/selenium-users?hl=en.-Hide quoted text -

tulsi.tester

unread,
Apr 3, 2012, 3:16:11 AM4/3/12
to Selenium Users
Hi Sirus,

The cybervillainsCA certificate will not be availabel under TRUSTED
ROOT CERTIFICATION AUTHORITIES. You need to install there. But you
will get that certificate under sslSupport folder of your extracted
selenium-server jar file. Please follow the process.

1. Unzip selenium-server-standalone-2.20.0.zip file
2. Open settings in chrome.
3. Open Under the hood tab
4. Click on Manage certificates
5. Click on import
6. Click on Next
7. Browse the file cybervillainsCA ( which is in sslSupport of
unzipped folder of selenium server)
8. Click on Next
9. Select Place all certificates in the following store
10. Click on browse button
11. Selecte trust root certification authorities
12. click on next
13. click on finish and then ok.

> > > > >http://groups.google.com/group/selenium-users?hl=en.-Hidequoted text -
>
> > > - Show quoted text -- Hide quoted text -

apr...@gmail.com

unread,
Nov 7, 2013, 4:07:17 AM11/7/13
to seleniu...@googlegroups.com
Hi Guys I am having a problem will SSL certs on Chrome to.
I have installed the Cyber Villains CA, and if I click the padlock it says the identity has been verified.
However the page which is trying to access the site says:

HTTP ERROR: 400
Could not proxy https://10.50.157.220:443/login
java.lang.RuntimeException: Couldn't establish SSL handshake. Try using trustAllSSLCertificates.
sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

RequestURI=/login

Powered by Jetty://

I cannot use trustAllSSLCertificates as I have some tests that use certificates to authenticate which fail if trustAllSSLCertificates is turned on.
Can anyone explain why I am getting this error when the ID has been verfied?

Setup:
Selenium RC 2.37.0 - prebuilt Jar with no extra options
Windows 7
Chrome 30.0.1599.101

apr...@gmail.com

unread,
Nov 7, 2013, 7:53:22 AM11/7/13
to seleniu...@googlegroups.com
I have found that if I run chrome.exe from the commandline with --proxy-server=localhost:4444 and visit the site then I get the error to.
Is Chrome 30 supported on selenium 2.37.0?

Gurudatt More

unread,
Jul 3, 2014, 2:47:56 AM7/3/14
to seleniu...@googlegroups.com
Hi Tulasi/All,

I am getting error like HTTP ERROR: 400
Could not proxy https://url

java.lang.RuntimeException: Couldn't establish SSL handshake

I have used -trustAllCertificates and i have also set cybervillainsCA certificate under TRUSTED
ROOT CERTIFICATION AUTHORITIES but i m unable to overcome the same issue.

Any help will be appreciated....

Regards,
Guru

Prasad

unread,
Jul 20, 2015, 2:35:10 PM7/20/15
to seleniu...@googlegroups.com
hi,

Any solution found for this error ? tried, trust AllSSLCerrtificates .. importing cybervillan cert. But doesn't work. Could anyone help me out pl ??
Reply all
Reply to author
Forward
0 new messages