zopefoundation / zope.testbrowser

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

getLink() used to see iframes, now it doesn't #69

Open mgedmin opened 5 years ago

mgedmin commented 5 years ago

The old mechanize-based zope.testbrowser allowed the following:

>>> print(browser.contents)
 ...
  <iframe width="..." height="..." src="http://localhost/style_preview.html"></iframe>
...
>>> browser.getLink(url='preview')
<Link text=None url='http://localhost/pdr/style_preview.html'>
>>> browser.getLink(url='preview').click()

The new WebTest-based zope.testbrowser does not treat iframes as links.

(I'm not arguing that it should, but maybe we want to add a note about this to the documentation and WONTFIX this bug?)