{"action":"closed","issue":{"url":"https://api.github.com/repos/spooning/SeleniumLibrary/issues/209","labels_url":"https://api.github.com/repos/spooning/SeleniumLibrary/issues/209/labels{/name}","comments_url":"https://api.github.com/repos/spooning/SeleniumLibrary/issues/209/comments","events_url":"https://api.github.com/repos/spooning/SeleniumLibrary/issues/209/events","html_url":"https://github.com/spooning/SeleniumLibrary/issues/209","id":101419656,"number":209,"title":"Add keywords for checking whether element has scrollbars","user":{"login":"spooning","id":1658993,"avatar_url":"https://avatars.githubusercontent.com/u/1658993?v=3","gravatar_id":"","url":"https://api.github.com/users/spooning","html_url":"https://github.com/spooning","followers_url":"https://api.github.com/users/spooning/followers","following_url":"https://api.github.com/users/spooning/following{/other_user}","gists_url":"https://api.github.com/users/spooning/gists{/gist_id}","starred_url":"https://api.github.com/users/spooning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spooning/subscriptions","organizations_url":"https://api.github.com/users/spooning/orgs","repos_url":"https://api.github.com/users/spooning/repos","events_url":"https://api.github.com/users/spooning/events{/privacy}","received_events_url":"https://api.github.com/users/spooning/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spooning/SeleniumLibrary/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/spooning/SeleniumLibrary/labels/prio-medium","name":"prio-medium","color":"ededed"},{"url":"https://api.github.com/repos/spooning/SeleniumLibrary/labels/wontfix","name":"wontfix","color":"ffffff"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-17T13:21:15Z","updated_at":"2015-08-17T13:21:36Z","closed_at":"2015-08-17T13:21:36Z","body":"> *Originally submitted to [Google Code](http://code.google.com/p/robotframework-seleniumlibrary/issues/detail?id=209) by mangaroo on 16 Oct 2011*\n\n\nI may submit a patch with the requested enhancement later on, but in either case, entering issue for tracking purposes and as FYI.\r\n\r\nI came across this need in another Selenium project. Perhaps a corner seldom used case, but there may be times this would be a useful keyword.\r\n\r\nSuggested keywords:\r\n\r\n* Element Should Contain Vertical Scrollbar\r\n* Element Should Not Contain Vertical Scrollbar\r\n* Element Should Contain Horizontal Scrollbar\r\n* Element Should Not Contain Horizontal Scrollbar\r\n\r\nCan be implemented similar to this PHP code snippet, where $this is the selenium object:\r\n\r\n//adapted from <a href=\"http://selenium-automation.blogspot.com/2010/10/selenium-automation-problems.html\" rel=\"nofollow\">http://selenium-automation.blogspot.com/2010/10/selenium-automation-problems.html</a>\r\n\r\n    \tif($orientation == \"vertical\"){\r\n    \t\t$locatorHeight = $this-&gt;getEval(\"this.browserbot.findElement(\\\"\".$locator.\"\\\").clientHeight\");\r\n    \t\t$scrollHeight = $this-&gt;getEval(\"this.browserbot.findElement(\\\"\".$locator.\"\\\").scrollHeight\");\r\n    \t\tif($locatorHeight &lt; $scrollHeight){\r\n\t\t\t\treturn TRUE; //scrollbar appears\r\n\t\t\t}else{\r\n\t\t\t\treturn FALSE; //scrollbar not appear\r\n\t\t\t}\r\n    \t}else{ //$orientation == \"horizontal\"\r\n    \t\t$locatorWidth = $this-&gt;getEval(\"this.browserbot.findElement(\\\"\".$locator.\"\\\").clientWidth\");\r\n    \t\t$scrollWidth = $this-&gt;getEval(\"this.browserbot.findElement(\\\"\".$locator.\"\\\").scrollWidth\");\r\n    \t\tif($locatorWidth &lt; $scrollWidth){\r\n\t\t\t\treturn TRUE; //scrollbar appears\r\n\t\t\t}else{\r\n\t\t\t\treturn FALSE; //scrollbar not appear\r\n\t\t\t}\n\n"}}