Casperjs popup not found by waitForPopup() -


waitforpopup() function not seem identifying popup 'this.popups' if there <deleted> entry in 'this.popups' before actual popup.

i have main form in 1 can create new data clicking on popup link. user creates new data on popup window. user saves on popup , closes , main form refreshed.

trying automate multiple new data entries. problem works first time errors out @ waitforpop() on second time. gives error popup did not appear in timeout (5 sec).

casper.waitforpopup(/add_new_tasks/, function () {     /* code */ }); 

i added following code before waitforpopup() call findbyregexp() function directly.

this.wait(2000, function () {     this.echo("popup list entries - "+this.popups.list());     this.echo("search popup " + this.popups.findbyregexp(/add_new_tasks/)); }); 

for first time following messages -

popup list entries - http://blahblah/tasks/add_new_tasks.do?popupmode=true search popup webpage(name = "webpage") 

for second time following messages -

popup list entries - <deleted>,http://blahblah/tasks/add_new_tasks.do?popupmode=true fail error: cannot access member `url' of deleted qobject 

casperjs version 1.1. phantomjs - 1.9.7. have tried on phantom 1.9.8 , 1.9.2. windows 8.1 os.

i have added popup created, loaded , closed events , can see this.popups array getting updated properly. second time created , loaded events fired.

any pointers can workaround this, or doing incorrectly. thanks...


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -