Overflow:hidden breaks find #195

Closed
JaredSartin opened this Issue Oct 17, 2011 · 5 comments

Comments

Projects
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?

Owner

jferris commented Oct 17, 2011

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

helper:

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

Error:

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".

Owner

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.

Contributor

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