Resize events in PhantomJS but not in Chrome

286 views
Skip to first unread message

Andreas Marek

unread,
May 14, 2013, 8:06:08 AM5/14/13
to phan...@googlegroups.com
Hi,

we are running a AngularScenario E2E test in PhantomJS.

Our tested website is embedded in an iframe (this is done by the ScenarioRunner).

Every time mouse events are triggered our window object (the inner window object of the iframe) receives resize events. These resize events break our test.

They are only fired in PhantomJS but not in Chrome.

Can you help us to understand where these events come from?

If needed we can provide a code example.

Thanks,
Andi

James Greene

unread,
May 14, 2013, 12:27:59 PM5/14/13
to phan...@googlegroups.com
You might just consider filing this as a bug:  https://github.com/ariya/phantomjs/issues/new

Please provide a reduced/simplified code sample to reproduce the issue.
Also include:
  • OS
  • OS version
  • PhantomJS version
  • whether your PhantomJS executable is a downloaded binary or built from source.

Sincerely,
    James Greene



--
You received this message because you are subscribed to the Google Groups "phantomjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to phantomjs+...@googlegroups.com.
Visit this group at http://groups.google.com/group/phantomjs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Duncan

unread,
Jul 19, 2016, 2:16:24 AM7/19/16
to phantomjs, andrea...@hypoport.de
Did you ever find a solution to this? I came across the same issue.
The pages under test have event handlers for resize events, which break the tests.

Thanks for any clues you can share.

Duncan

unread,
Jul 19, 2016, 11:54:35 PM7/19/16
to phantomjs, andrea...@hypoport.de
I have a solution. For me at least, it does not trigger the resize event:

// This is a workaround alternative to this.click(link)
// It does not trigger a resize event. (1 test)
function myclick( test, casper, link ) {
    test
.assertExists(link);
    test
.comment('myclick: send click event to ' + link);
    casper
.evaluate(function(link) {
       
var evt = document.createEvent('MouseEvents');
        evt
.initEvent('click', true, false);
        document
.querySelector(link).dispatchEvent(evt);
   
}, link);
}



Akbar Basha

unread,
Mar 30, 2017, 5:27:15 AM3/30/17
to phantomjs, andrea...@hypoport.de
Hi Team,

is that issue fixed?... the resize event triggered automatically with out resize the window.... it's happen only in phantom js
Reply all
Reply to author
Forward
0 new messages