Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

zope.testbrowser supports `is_text_present` #210

Merged
merged 1 commit into from Jan 21, 2013

Conversation

Projects
None yet
3 participants
Contributor

medwards commented Jan 21, 2013

With is_text_present promoted to the canonical way to grab text content on a page, I updated zope.testbrowser to be consistent.

@fsouza fsouza merged commit ff40923 into cobrateam:master Jan 21, 2013

1 check passed

default The Travis build passed
Details
Contributor

fsouza commented Jan 21, 2013

Thank you :-)

Owner

hltbra commented Jan 22, 2013

This pull request seems to introduce a bug in splinter. There is no test running for this change as I can see...

ZopeTestBrowserDriverTest inherits from BaseBrowserTests, and at the moment IsTextPresentTest mixin isn't there.

I just tried here and it crashes. The exceptions caught are not enough. I adapting it to run the proper tests.

Owner

hltbra commented Jan 22, 2013

Did you guys realize this patch imports from selenium.common.exceptions? It has nothing to do with zope.testbrowser and ElementList.
That try/except is wrong. It should catch splinter.exceptions.ElementDoesNotExist, right?

@hltbra hltbra added a commit that referenced this pull request Jan 22, 2013

@hltbra hltbra Fix try/except of zope.testbrowser's `is_text_present` and enable tes…
…ts to that feature. Refs #210
baed13d
Contributor

medwards commented Jan 23, 2013

Thanks Hugo, that was a serious herp derp moment on my part. I've been spending a lot of time working with Browser.driver more directly so I get mixed up when I come back to splinter-land. I should know better and not ned more proof that manual testing is never enough!

Owner

hltbra commented Jan 23, 2013

That's ok, @medwards. It is good that you implemented it, and if you did not do nobody would have done. Thanks!

PS.: Shit happens. Sometimes I am not so confident with code I've written, and I use to remove the code, do not touch the tests, run the tests, and if nothing breaks, it means I did not setup the test correctly.

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