In this blog article, we show you how to stop Selenium Server using Apache HTTP Client GET method. The Apache HttpClient library simplifies handling HTTP requests. To use this library download the binaries with dependencies from http://hc.apache.org/.
//URL to stop Selenium Server String strURL="http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer"; //HTTP Default client Object HttpClient client = new DefaultHttpClient(); //HTTP Get Object HttpGet request = new HttpGet(strURL); //Executing the request HttpResponse response = client.execute(request);
Read more about Apache HTTP Client
Comments(0)