span.text returns empty string

115 views
Skip to first unread message

Phillip Rhodes

unread,
Aug 4, 2014, 4:34:52 PM8/4/14
to phan...@googlegroups.com
Hello.

I am running a suite of watir tests that were originally run under Chrome.  I am now running the tests using phantomjs and see a few errors that appear to be specific to  phantomjs and the inner text property of the span element.
For example, given the following web content extract:
...
<li><a class="contact" href="#" data-icon="&#xe028;"><span class="access">Contact Information</span></a></li>
...

I have the following 2 watir/ruby statements:
puts "html " + browser.a(:class => "contact").span(:class => "access").html
puts "text " + browser.a(:class => "contact").span(:class => "access").text

The 2 statements generate the output for the "html" method.  The text method returns nothing.  I expect to see "Contact Information" output here.
.html <span class="access">Contact Information</span>
text


I did not see a bug reported on this in the issue list for phantomjs.  I was hoping to hear if others experienced this issue as well and any other thoughts on this.

Thanks!

Peter Hamilton

unread,
May 15, 2016, 1:39:07 AM5/15/16
to phantomjs
I'm seeing the same issue, for what it is worth.

Oded Badt

unread,
Jun 14, 2016, 8:09:59 AM6/14/16
to phantomjs
Same here, for what its worth...
Reply all
Reply to author
Forward
0 new messages