laurentj / slimerjs

A scriptable browser like PhantomJS, based on Firefox
http://slimerjs.org
Other
3k stars 258 forks source link

Issue when clicking on link to open new / popup window #636

Closed kensoh closed 7 years ago

kensoh commented 7 years ago

versions

Steps to reproduce the issue

Go to a web page (for example http://tebel.org/index_mobile.php) Click on a link that opens up a new window (for eg Interface automation)

Actual results:

New window opens up but remains blank

Expected results:

New window opens up and loads normally

Additional details:

Hi Laurent and SlimerJS users, I'm raising this on behalf of @thim81 who is experiencing this issue. He is using a tool that I made that wraps around CasperJS. When we tried using PhantomJS or Chrome it works. But for Firefox through SlimerJS somehow we experience this unexpected behavior. I'm not sure if anyone else experiences this effect, I can't find related issues on this here so I'm raising it.

I've pasted below generated CasperJS code which the issue can be replicated. Works for PhantomJS/Chrome but not Firefox.

casper.start('http://tebel.org/index_mobile.php', function() {
techo('http://tebel.org/index_mobile.php' + ' - ' + this.getTitle() + '\n');});

casper.then(function() {
{this.echo('click Interface automation');
casper.waitFor(function check() {return x('//*[contains(text(),"Interface automation")]');},
function then() {this.click(x('//*[contains(text(),"Interface automation")]'));},
function timeout() {this.echo('ERROR - cannot find Interface automation').exit();});}});
laurentj commented 7 years ago

Hi. Thanks for your report. But this issue is already known. issue #607

kensoh commented 7 years ago

Thanks Laurent, got it. And I'm sorry that I miss that issue.

(copying @thim81 , fyi it is a known issue)