{"action":"opened","issue":{"url":"https://api.github.com/repos/webdriverio/webdrivercss/issues/168","repository_url":"https://api.github.com/repos/webdriverio/webdrivercss","labels_url":"https://api.github.com/repos/webdriverio/webdrivercss/issues/168/labels{/name}","comments_url":"https://api.github.com/repos/webdriverio/webdrivercss/issues/168/comments","events_url":"https://api.github.com/repos/webdriverio/webdrivercss/issues/168/events","html_url":"https://github.com/webdriverio/webdrivercss/issues/168","id":184469668,"number":168,"title":"Session Not found exception while running .js file","user":{"login":"JigeshShah","id":1023945,"avatar_url":"https://avatars.githubusercontent.com/u/1023945?v=3","gravatar_id":"","url":"https://api.github.com/users/JigeshShah","html_url":"https://github.com/JigeshShah","followers_url":"https://api.github.com/users/JigeshShah/followers","following_url":"https://api.github.com/users/JigeshShah/following{/other_user}","gists_url":"https://api.github.com/users/JigeshShah/gists{/gist_id}","starred_url":"https://api.github.com/users/JigeshShah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JigeshShah/subscriptions","organizations_url":"https://api.github.com/users/JigeshShah/orgs","repos_url":"https://api.github.com/users/JigeshShah/repos","events_url":"https://api.github.com/users/JigeshShah/events{/privacy}","received_events_url":"https://api.github.com/users/JigeshShah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-21T12:05:13Z","updated_at":"2016-10-21T12:05:13Z","closed_at":null,"body":"Hi All,\r\n\r\nI am getting Session not found exception when I tried to run the below script using the command \"node webCSS.js\"\r\n\r\nSteps that I followed\r\n\r\n1) Installed node.js and GraphicsMagick Display on the system\r\n2) Installed and started Selenium StandaloneServer using below commands\r\nnpm install selenium-standalone@latest -g\r\nselenium-standalone install\r\nselenium-standalone start\r\n\r\n3) Installed webdriver io and webdriverCSS using below commands\r\nnpm install webdriverio@2 webdrivercss\r\n\r\n4) After that I started ran the script WebCSS.js (script provided below)\r\n\r\n**Script**\r\nvar assert = require('assert');\r\n\r\n// init WebdriverIO\r\nvar client = require('webdriverio').remote({desiredCapabilities:{browserName: 'firefox'}})\r\n// init WebdriverCSS\r\nrequire('webdrivercss').init(client);\r\n\r\nclient\r\n    .init()\r\n    .url('https://www.google.com/')\r\n    .webdrivercss('startpage',[\r\n        {\r\n            name: 'header',\r\n            elem: '#header'\r\n        }, {\r\n            name: 'hero',\r\n            elem: '//*[@id=\"hero\"]/div[2]'\r\n        }\r\n    ], function(err, res) {\r\n        assert.ifError(err);\r\n        assert.ok(res.header[0].isWithinMisMatchTolerance);\r\n        assert.ok(res.hero[0].isWithinMisMatchTolerance);\r\n    })\r\n    .end();\r\n\r\nError that I am getting\r\n\r\n17:00:52.533 INFO - Executing: [get: https://www.google.com/])\r\n17:00:59.759 INFO - Done: [get: https://www.google.com/]\r\n17:01:00.079 INFO - Executing: [delete session: 376fc292-6d51-4986-9bd0-56fa59877af9])\r\n17:01:00.192 INFO - Executing: [execute script: return (function () {\r\n                /**\r\n                 * remove scrollbars\r\n                 */\r\n                // reset height in case we're changing viewports\r\n                document.documentElement.style.height = 'auto';\r\n                document.documentElement.style.height = document.documentElement.scrollHeight + 'px';\r\n                document.documentElement.style.overflow = 'hidden';\r\n\r\n                /**\r\n                 * scroll back to start scanning\r\n                 */\r\n                window.scrollTo(0, 0);\r\n\r\n                /**\r\n                 * get viewport width/height and total width/height\r\n                 */\r\n                return {\r\n                    screenWidth: Math.max(document.documentElement.clientWidth, window.innerWidth || 0),\r\n                    screenHeight: Math.max(document.documentElement.clientHeight, window.innerHeight || 0),\r\n                    documentWidth: document.documentElement.scrollWidth,\r\n                    documentHeight: document.documentElement.scrollHeight,\r\n                    devicePixelRatio: window.devicePixelRatio\r\n                };\r\n            }).apply(null, arguments), [null]])\r\n17:01:01.441 INFO - Done: [delete session: 376fc292-6d51-4986-9bd0-56fa59877af9]\r\n17:01:02.045 WARN - Exception thrown\r\norg.openqa.selenium.remote.SessionNotFoundException: The FirefoxDriver cannot be used after quit() was called.\r\nBuild info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'\r\n        at org.openqa.selenium.firefox.FirefoxDriver$LazyCommandExecutor.execute(FirefoxDriver.java:377)\r\n        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)\r\n        at org.openqa.selenium.remote.RemoteWebDriver.executeScript(RemoteWebDriver.java:577)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\r\n        at java.lang.reflect.Method.invoke(Unknown Source)\r\n        at org.openqa.selenium.support.events.EventFiringWebDriver$2.invoke(EventFiringWebDriver.java:103)\r\n        at com.sun.proxy.$Proxy1.executeScript(Unknown Source)\r\n        at org.openqa.selenium.support.events.EventFiringWebDriver.executeScript(EventFiringWebDriver.java:217)\r\n        at org.openqa.selenium.remote.server.handler.ExecuteScript.call(ExecuteScript.java:54)\r\n        at java.util.concurrent.FutureTask.run(Unknown Source)\r\n        at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)\r\n        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)\r\n        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)\r\n        at java.lang.Thread.run(Unknown Source)\r\n17:01:02.201 WARN - Exception: The FirefoxDriver cannot be used after quit() was called.\r\nBuild info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'\r\nDriver info: driver.version: EventFiringWebDriver\r\n"}}
{"actor":{"display_login":"JigeshShah"}}