zopefoundation / zope.testbrowser

Programmable browser for functional black-box tests
Other
21 stars 16 forks source link

Restore ignoring hidden elements when searching by label. #41

Closed fschulze closed 6 years ago

fschulze commented 7 years ago

For 4.0.4 the test looks like this and passes:

def test_additional_hidden_element_with_by_label_search():
    """
    >>> browser = Browser()
    >>> browser.open('''
    ...   <html><body>
    ...   <form>
    ...     <label>Label with additional hidden element
    ...       <input type="text" name="text-next-to-hidden" />
    ...       <input type="hidden" name="hidden-next-to-text" />
    ...     </label>
    ...   </form></body></html>
    ... ''')
    GET / HTTP/1.1
    ...
    >>> c = browser.getControl("Label with additional")
    >>> c.name
    'text-next-to-hidden'
    """
fschulze commented 7 years ago

I just rebased this PR after I noticed I branched from an older version and had put the changelog entry in the wrong place.

fschulze commented 6 years ago

ping

mgedmin commented 6 years ago

Oh, sorry, didn't notice that you're not a Zope Foundation committer. The usual process is:

To become a committer all you have to do is sign the Committer Agreement.

(AFAIU Zope Foundation policy doesn't allow me to merge code copyrighted by someone who hasn't signed the agreement. It's hard to check, since the Zope Foundation website is not reachable for the last several months and nobody who cares knows how to resurrect it. I'm sorry for the inconvenience!)

fschulze commented 6 years ago

I've rebased and am waiting for tests to finish ...