Skip to content

Instantly share code, notes, and snippets.

@rhpijnacker
Created August 31, 2017 07:03
Show Gist options
  • Save rhpijnacker/f133a8667e5f7269b116215a3c7c2257 to your computer and use it in GitHub Desktop.
Save rhpijnacker/f133a8667e5f7269b116215a3c7c2257 to your computer and use it in GitHub Desktop.
safaridriver bug on input with style "overflow: hidden"
#!/usr/bin/ruby -w
require 'selenium-webdriver'
driver = Selenium::WebDriver.for :safari, driver_path: '/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver'
driver.manage.window.maximize
driver.navigate.to "http://localhost/input-overflow-test.html"
element = driver.find_element(:id => "input-overflow-default")
p element.selected?
p element.displayed?
element.click
element = driver.find_element(:id => "input-overflow-hidden")
p element.selected?
p element.displayed?
element.click
driver.quit
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>input test</title>
</head>
<body>
<input id="input-overflow-default" style="overflow: default;">
<input id="input-overflow-hidden" style="overflow: hidden;">
</body>
</html>
@dannyfinks
Copy link

I noticed the same issue. Do you know if their is any open issues for this or any workarounds?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment