PhantomjsDriver Geb with Jquery click events throwing error workaround

When moving to phantomjs from using Geb with a browser you will find that some click events do not fire and give you an error.  I have not investigated this thoroughly on what works and what fails.

Tested Config:
Geb: 0.6.3
Phantomjs: 1.9.1
Jquery: 1.7.1
phantomjsdriver: 1.0.4

The problem I had was   $(“.SUBMIT_BUTTON”).click() will not always work and give you the following error:

Error: cannot access member `resetOneShotCallbacks’ of deleted QObject


My workaround was to fire a query selector event.


Little convenience method to put in your Geb helper class

void clickElement(name){

In you Geb test case

    //  // the old action that no longer works.

You will have to go through your whole suite of tests several times to find out which events you will have to change.  Button clicks may not be the only thing that fails.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s