capybara-webkit/spec
Sandro Turriate aab340ae8d Fix returning invisible text on a hidden page
Commit 2f3832fa15 introduced a bug wherein
if the entire page has hidden content, the entire page text is returned
as visible text. The bug was introduced to support SVG text handling.
The svg element doesn't have an innerText property, but does have
textContent property, so the patch was written to fallback on
textContent. The thing is, innerText will return an empty string when
there is no visible text on the screen, which is a falsey condition, so
we fall back to textContent. Thankfully, calling innerText on an svg
element returns undefined, so now we can confidently return the empty
string when it exists before falling back to textContent.

The patch could also be written as:

    return visible_text == undefined ? node.textContent : visible_text;

(double equals should work fine in this case)
2015-01-20 17:06:39 -08:00
..
integration Save a screenshot when raising a ClickFailed exception 2013-11-09 15:30:58 -05:00
support Introduce allowed, blocked URL filters 2014-12-05 12:48:03 -05:00
browser_spec.rb Skip forking spec on JRuby 2014-01-28 19:17:16 -05:00
capybara_webkit_builder_spec.rb Reset environment variables in Builder spec 2013-03-11 22:28:21 -04:00
connection_spec.rb Raise better errors if server fails to start 2014-07-13 14:35:05 -04:00
cookie_jar_spec.rb switch from == to eq to remove warnings 2013-08-11 15:40:25 +01:00
driver_rendering_spec.rb Better failure when screenshot doesn't save 2014-02-06 10:24:28 -05:00
driver_resize_window_spec.rb Update for Capybara 2.3.0 2014-07-01 20:36:42 -04:00
driver_spec.rb Fix returning invisible text on a hidden page 2015-01-20 17:06:39 -08:00
errors_spec.rb Instantiate errors in capybara-webkit 2013-05-21 21:48:38 +04:00
selenium_compatibility_spec.rb Don't interact with readonly elements 2014-07-13 19:19:01 -04:00
self_signed_ssl_cert.rb Remove some unused global variables. 2011-10-14 17:18:33 -04:00
spec_helper.rb Don't interact with readonly elements 2014-07-13 19:19:01 -04:00