{"action":"opened","issue":{"url":"https://api.github.com/repos/lightbody/browsermob-proxy/issues/298","labels_url":"https://api.github.com/repos/lightbody/browsermob-proxy/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/lightbody/browsermob-proxy/issues/298/comments","events_url":"https://api.github.com/repos/lightbody/browsermob-proxy/issues/298/events","html_url":"https://github.com/lightbody/browsermob-proxy/issues/298","id":101157542,"number":298,"title":"HAR file captured from Selenium Webdriver is always corrupt","user":{"login":"leslyarun","id":5101854,"avatar_url":"https://avatars.githubusercontent.com/u/5101854?v=3","gravatar_id":"","url":"https://api.github.com/users/leslyarun","html_url":"https://github.com/leslyarun","followers_url":"https://api.github.com/users/leslyarun/followers","following_url":"https://api.github.com/users/leslyarun/following{/other_user}","gists_url":"https://api.github.com/users/leslyarun/gists{/gist_id}","starred_url":"https://api.github.com/users/leslyarun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leslyarun/subscriptions","organizations_url":"https://api.github.com/users/leslyarun/orgs","repos_url":"https://api.github.com/users/leslyarun/repos","events_url":"https://api.github.com/users/leslyarun/events{/privacy}","received_events_url":"https://api.github.com/users/leslyarun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-15T10:14:02Z","updated_at":"2015-08-15T10:14:02Z","closed_at":null,"body":"I'm using the following codes with Selenium, to capture network traffic in HAR file:\r\n\r\n```\r\npublic class LoginTest {\r\n\r\n\tpublic WebDriver driver;\r\n\tBrowserMobProxy server = new BrowserMobProxyServer();\r\n\tDesiredCapabilities ieCapabilities  = DesiredCapabilities.internetExplorer();\r\n\r\n  @Test\r\n  @Parameters({ \"strUserName\", \"strPasword\" })\r\n  public void loginCheck(String strUserName, String strPasword) throws IOException {\r\n\r\n\t  LoginH objLogin = open(\"/abs/login\",LoginH.class);\r\n\t  objLogin.loginToHoegh(strUserName, strPasword);\r\n\t  $(byText(\"Please Login\")).should(disappear);\r\n\t  Reporter.log(\"Login Success\");\r\n  }\r\n\r\n  @BeforeSuite\r\n  public void beforeSuite() throws IOException {\r\n\r\n\t  File file = new File(\"C:\\\\IEDriverServer.exe\");\r\n\t  System.setProperty(\"webdriver.ie.driver\", file.getAbsolutePath());\r\n\t  ieCapabilities .setCapability(\"ignoreZoomSetting\", true);\r\n\t  ieCapabilities .setCapability(\"nativeEvents\", false);\r\n\r\n      server.enableHarCaptureTypes(CaptureType.getRequestCaptureTypes());\r\n      server.enableHarCaptureTypes(CaptureType.getResponseCaptureTypes());\r\n\r\n      // get the selenium proxy object\r\n      Proxy seleniumProxy = ClientUtil.createSeleniumProxy(server);\r\n      ieCapabilities.setCapability(CapabilityType.PROXY, seleniumProxy);\r\n   \r\n      server.newHar(\"hh\");\r\n      driver= new InternetExplorerDriver(ieCapabilities);\r\n      WebDriverRunner.setWebDriver(driver);\r\n\r\n\t  baseUrl=\"http://abcd.com\";\r\n\t  timeout = 40000;\r\n\t  startMaximized = true;\r\n  }\r\n\r\n  @AfterSuite\r\n  public void afterSuite() throws IOException {\r\n\r\n\t\t// get the HAR data\r\n\t      Har har = server.getHar();\r\n\r\n\t   // Write the HAR Data in a File\r\n\t   \t\tFile harFile = new File(\"F:\\\\Traffic\"+\" 1\"+\".har\");\r\n\t   \t\thar.writeTo(harFile);\r\n\t  closeWebDriver();\r\n\t  server.stop();\r\n  }\r\n\r\n}\r\n\r\n```\r\n\r\nBut when I visualize the generated HAR file in www.softwareishard.com/har/viewer/ , it always says, something is missing and it is not optional\r\n\r\nPlease tell me If im doing anything wrongly. Above code uses Selenide API for Webdriver\r\n"}}