![]() | Capybara save_and_open_page produces blank page |
|
07 Oct 2012, 13:29
Iain Wood (6 posts) |
I’m following through chapter 8 and all seems to be working as expected except that the page saved and displayed by capybara (pg 150) is blank. If I point my browser at the page then I see the form as expected, but there is nothing on the saved page. I can reproduce this by using the sample code (code/support_code/18) and just making a simple change to the feature file so that the test fails. Any ideas what I can change to see the page as Capybarra sees it? regards Iain |
|
08 Oct 2012, 06:13
Matt Wynne (83 posts) |
That’s puzzling. Can you open the HTML file in an editor, or view source on it and see what it contains? |
|
08 Oct 2012, 07:17
Iain Wood (6 posts) |
Just a single line: <!DOCTYPE html PUBLIC ”-//W3C//DTD HTML 4.0 Transitional//EN” “http://www.w3.org/TR/REC-html40/loose.dtd”> |
|
08 Oct 2012, 10:14
Matt Wynne (83 posts) |
Right. My only guess is that there’s something wrong in your scenario such that Capybara hasn’t actually seen anything yet. Maybe you’re missing a call to One thing you could try is to add the @javascripttag to the scenario, which should cause it to open up in Firefox as it runs. That might give you some more clues as to what’s happening. |
|
15 Oct 2012, 16:11
Iain Wood (6 posts) |
I downloaded a fresh copy of support_code/18, edited the feature file so it would fail, and added the @ javascript tag. @javascript |
|
16 Oct 2012, 08:59
Jon Rowe (1 post) |
If this is a Javascript scenario then it sounds like a race condition between the driver and the “browser”. You could put a |
|
18 Oct 2012, 16:11
Iain Wood (6 posts) |
Thanks Jon. I will try this when I can get it working again. The new version of Firefox doesn’t seem to want to play with selenium so at the moment I can get no further than an error message saying “Unable to establish a stable firefox connection in 60 seconds” |
| You must be logged in to comment |

