public static BasicClientCookie convertToHttpClientCookie ( final Cookie seleniumCookie ) { BasicClientCookie httpClientCookie = new BasicClientCookie ( seleniumCookie . getName ( ) , seleniumCookie . getValue ( ) ) ; httpClientCookie . setDomain ( seleniumCookie . getDomain ( ) ) ; httpClientCookie . setPath ( seleniumCookie . getPath ( ) ) ; httpClientCookie . setExpiryDate ( seleniumCookie . getExpiry ( ) ) ; httpClientCookie . setSecure ( seleniumCookie . isSecure ( ) ) ; if ( seleniumCookie . isHttpOnly ( ) ) { httpClientCookie . setAttribute ( HTTP_ONLY_ATTRIBUTE , StringUtils . EMPTY ) ; } return httpClientCookie ; }
Converts a Selenium cookie to a HTTP client one .