korimo / firewatir

Automatically exported from code.google.com/p/firewatir
0 stars 0 forks source link

TypeError: elements_frames[1].contains_text is not a function #37

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Access a page with frames
2. Try to verify if one of the frames contains a certain text using the
following:
puts(@@browser.frame(:name, 'main').contains_text('Penn State Behrend'))

I expect it to return "true" or "false" but instead it returns 
'TypeError: elements_frames[1].contains_text is not a function'

I am using:
FireWatir 1.1 with the latest JSSH for Firefox 2.0, Windows XP

I have attached a script that reproduces the issue.  This is possible to do
within Watir and it works as expected within Watir.

If there are any other suggestions for asserting that a string exists
within a given frame I am open to them.  However - I still wanted to bring
this to the attention of the FireWatir group, as it is an inconsistency
between how Watir and FireWatir operates.

Original issue reported on code.google.com by lestr...@gmail.com on 15 Aug 2007 at 9:40

Attachments:

GoogleCodeExporter commented 9 years ago
BTW:  To use the script that I provided above you will need my implementation of
Watir::Simple for FireWatir.

I have attached it.

Original comment by lestr...@gmail.com on 15 Aug 2007 at 9:41

Attachments:

GoogleCodeExporter commented 9 years ago
We are looking into it. Meanwhile you can try this:

ff.frame[0].html which will return you HTML of the frame and then you can use 
Ruby
String functions to match the text.
Hope this helps.

Original comment by ang...@gmail.com on 17 Aug 2007 at 1:45

GoogleCodeExporter commented 9 years ago

Original comment by ang...@gmail.com on 17 Aug 2007 at 1:46

GoogleCodeExporter commented 9 years ago
Fixed. Latest code is in SVN.

Original comment by ang...@gmail.com on 10 Oct 2007 at 11:06