Technical Project Lead @ Huawei Technologies

My photo
Bangalore/Hyderabad, Karnataka/Andhra Pradesh, India
Have an overall 13 + yrs of experience Currently working as an Senior Architect.Expertise in design,implementation of Automation frameworks for Opensource automation tools like Selenium,Jmeter, Webdriver,Appium, Robotium Expertise in integrating Test & ALM Management tools like Rally,Qmetry,JIRA-Zephyr with Automation frameworks Expertise in design and developmenet Mobile Automation frameworks for tools like Appium, Robotium Remote Control,Cucumber BDD,Manual Testing

Followers

Saturday, September 18, 2010

Programatically Starting Selenium Server to accept SSL Certificates

  public static void startServerInProxymode(){
        // Precondition for the entire test class is Login
        ServerSocket serverSocket;
        try {
            serverSocket = new ServerSocket(RemoteControlConfiguration.DEFAULT_PORT);
            serverSocket.close();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            System.out.println("Failed to create socket connection on Default PORT");
            e.printStackTrace();
        }
       
        RemoteControlConfiguration rcc = new RemoteControlConfiguration();
        rcc.setTrustAllSSLCertificates(true);
        rcc.setPort(RemoteControlConfiguration.DEFAULT_PORT);
        try {
            server = new SeleniumServer(false,rcc);
            server.start();
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
       
    }

2 comments:

  1. Hi Kiran,

    I like ur selenium solution which u have mentioned in your blog. I have searched something about SSL Cert. in selenium for https and then i found ur blog.

    Will u plz elaborate this solution to me.

    Regards,
    Shubham

    ReplyDelete
  2. Hi Kiran,

    Ur blog is very nice,,Could you please elaborate this how can i use this program, for me i set cybervillan certificate and *firefoxproxy/iexploreproxy, but getting error, not able to execute can u plz explain me step by step to get succeed...
    thanks,
    Ramesh

    ReplyDelete