Migrating scenario generator to phantomJs