Open millisami opened 14 years ago
Overlays should be fine: they're still in the DOM.
You could try seeing if it's getting created, by looking at the innerHTML of the container ...
Well, the same code above does work with selenium webdriver when I run the feature. I hope this confirms that the innerHTML is right.
When I change the capybara driver to use envjs, it fails.
Sorry; didn't mean to imply that the code wasn't right. I actually suspect some event processing isn't working and the overlay DOM elements aren't getting created. But I'm not sure.
Can you put an example somewhere I can try?
Alright, here is the repo http://github.com/millisami/capybara-envjs-experiment
It has two branches. master
branch has the selenium one which works and another branch named envjs
, which uses the envjs modified one which is failing.
Thanks. I'll try to look at this this weekend.
Sure, I am waiting eagerly coz I don't like the selenium opening firefox everytime. It drgas me.
Hi, did you get any time to look up the problem??
Still trying. Time's tight.
Looks like you need style support that's not in envjs.
I had to tweak a couple of things to get the test to work: I had to comment-out the javascript emulation stuff in the config and it looks like the javascript support was turned off (#@javascript?)
When I did that, it caused errors in env-js's timer loop. The fancybox code is trying to do something with the CSS style attribute which is not currently supported (at least in the johnson fork ... not sure where the rhino port stands on this).
So, does that mean I have to abandon it for a while ?
At this point, I don't see this getting worked on by me in the next month or two. I'd like to, at some point, but I'm not sure when that's going to be possible. So unless someone steps up ...
I'm using FancyBox to load the content via ajax request in a Rails3rc app.
The following is the feature which passes/works in development, testing via browser, but when I try to test it via envjs, it blows up. Then I should see "You are Doing Good" within "#fancybox-inner" # features/step_definitions/websteps.rb:107 scope '//[@id = 'fancybox-inner']' not found on page (Capybara::ElementNotFound) ./features/step_definitions/web_steps.rb:14:in
with_scope' ./features/step_definitions/web_steps.rb:108:in
/^(?:|I )should see "([^"]_)"(?: within "([^"]*)")?$/' features/homepage.feature:34:in `Then I should see "You are Doing Good" within "#fancybox-inner"' This is the generated link to be clicked. Do GoodAnd this is the jquery/fancybox hook that makes it work. jQuery(document).ready(function($) { $("a.do_good_order").fancybox({ 'hideOnContentClick': true, 'width': 400, 'height': 300, 'autoScale': false, 'autoDimensions': false }); });
From the error above, its complaining about the
scope '//*[@id = 'fancybox-inner']' not found on page (Capybara::ElementNotFound)
So, my question is, does capybara-envjs supports or can detect the elements inside the
#fancybox-inner
div which is a overlayed container of FancyBox??