I am using Selenium to test a website with Google Chrome. The website
needs a security connection with https. When I manually use Chrome to
open it, there is NOT any problem (because I have imported the needed
cert in security option which is from IE options). But when Selenium
opens Chrome, I think it always opens a "clean" Chrome without any
settings. At this time, when connecting to the website, there is
always a "The site's security certificate is not trusted!" alert
screen. I must press "Proceed anyway" button to continue.
So, how can I solve this problem? I want Selenium to use Chrome with
the same steps as in other browsers. Does anybody know?
Thank you!
Thanks for your answer. I have tried your solution, but there is a
problem. I changed the browser to:
*custom "C:\Documents and Settings\yangmw\Local Settings\Application
Data\Google\Chrome\Application\chrome.exe" --user-data-dir="C:
\Documents and Settings\yangmw\Local Settings\Application Data\Google
\Chrome\User Data\Selenium"
The ...User Data\Selenium is a Chrome profile that I have created.
But it cannot be started. Selenium server report the following error.
Could you please help me on this problem? Thank you!!
ERROR MESSAGES:
11:46:22.475 ERROR - Failed to start new browser session, shutdown
browser and clear all session data
java.lang.NullPointerException
at
org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher.launchRemoteSession(AbstractBrowserLauncher.java:
30)
at
org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:
357)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
122)
at
org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
84)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:
699)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:
393)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:
364)
at
org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:
125)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:
820)
at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:
837)
at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:
357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:
534)
11:46:22.475 INFO - Got result: Failed to start new browser session:
Error while launching browser on session null
> > Thank you!- Hide quoted text -
>
> - Show quoted text -
--
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.
Thanks for your reply! Maybe my question was not clear. That problem
was on "Google Chrome", not Firefox. I have tried your code, but in
Google Chrome, there is still this issue. Do you have any ideas on
it?
On Mar 1, 3:38 pm, Niraj Kumar <bewith.ni...@gmail.com> wrote:
> Hi,
>
> We got the solution for avoiding security confirmation .
> Step1. Create a firefox profile to some location (i.e c:\nk) and start
> firefox with this profile
> close all firefox browser and go to run--> firefox -P then create a new
> profile then
> Step 2. Install " Remember Certificate exception fromhttps://addons.mozilla.org/en-US/firefox/addon/10246
> > org.openqa.selenium.server.browserlaunchers.AbstractBrowserLauncher.launchRemoteSession(AbstractBrowserLauncher.java:
> > 30)
> > at
>
> > org.openqa.selenium.server.BrowserSessionFactory.createNewRemoteSession(BrowserSessionFactory.java:
> > 357)
> > at
>
> > org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
> > 122)
> > at
>
> > org.openqa.selenium.server.BrowserSessionFactory.getNewBrowserSession(BrowserSessionFactory.java:
> > 84)
> > at
>
> > org.openqa.selenium.server.SeleniumDriverResourceHandler.getNewBrowserSession(SeleniumDriverResourceHandler.java:
> > 699)
> > at
>
> > org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:
> > 393)
> > at
>
> > org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:
> > 364)
> > at
>
> > org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:
> > selenium-user...@googlegroups.com<selenium-users%2Bunsubscribe@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/selenium-users?hl=en.
>
> --
> Thanks & Regard,
> Niraj Kumar- Hide quoted text -
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/217d998b-05ca-4473-a350-fab500e3033f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--Jim