Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Overflow:hidden breaks find #195

Closed
JaredSartin opened this Issue · 5 comments

3 participants

@JaredSartin

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
Owner

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

@JaredSartin

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.

@JaredSartin

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
Owner

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

Fixed on master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.