Capybara / Selenium jquery autocomplete test does not work if Firefox is not activated

I had a problem with the following code in the capybara test (encompassing jquery autocomplete selection)

page.evaluate_script %Q{ $('.ui-menu-item a:contains("#{target}")').trigger("mouseenter").click(); }

When Firefox is activated during the test, the test passes. When it remains inactive, the test fails. This seems to be documented in this issue , but I'm wondering if anyone found a job.

I am on OS X 10.6.7 and tried FF 4 and 3.6.10

Thanks in advance!

+3
source share
2 answers

As an alternative, I use capybara-webkit gem instead of selenium along with headless , and this works fine for me.

+1

, , applescript, Firefox . ruby, , Firefox :

`osascript -e \"tell application \\\"Firefox\\\" to activate\"`

: https://gist.github.com/2427601

+1

All Articles