integrate waitfor for phantomjs

commented out; something's still amiss