Overflow:hidden breaks find #195

JaredSartin opened this Issue Oct 17, 2011 · 5 comments


None yet
3 participants

I have

find('.document', text: text_content).click

where text_content is a string given to the method. This finds and clicks a .document element on the page just fine, that is until I add overflow: hidden on the element the text is in. All of my tests that pass the text_content string have short enough strings to not get hidden by the css.

Using the Selenium driver, the tests pass, the item is clicked. Using Webkit, the element is not found, thus it is not clicked. Any ideas or fixes?


jferris commented Oct 17, 2011

Can you paste the kind of error you get in failing tests?


def click_on_document(text_content)
  find('.document', text: text_content).click


Failure/Error: click_on_document "Doc Title"
Unable to find css ".document"

I have ensured this document is on the page with save_and_open_page and by running Selenium.

The "Doc Title" is text in a .title div (with overflow: hidden set on it) inside the .document div. The overflow hidden shouldn't (and visually doesn't) cut any text off that is less than approximately 20 words. So, the test string is well within the "visible bounds".


jferris commented Oct 17, 2011

I haven't run into this before, but I'll take a look whenever I can. If you can put together a failing test case for the driver, that would speed things up.


halogenandtoast commented Oct 21, 2011

Fixed on master

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