I have noticed that some Geb functional tests pass with Chrome but fail with PhantomJS, holding all other variables constant. This happens mostly with pages that have some kind of asynchronous activity - one call to $(selector).click()
triggers an event handler that updates the DOM, and the DOM updates need to complete before calling $(anotherSelector).click()
.
I can make the PhantomJS tests pass again by aggressively using waitFor
but I don't understand why this would be required with the PhantomJS GhostDriver and not the Chrome driver.
Unfortunately I haven't been able to construct a minimal test case yet isolated from my application.