How to perfectly isolate and clear environments between each test?
问题 I'm trying to connect to SoundCloud using CasperJS. What is interesting is once you signed in and rerun the login feature later, the previous login is still active. Before going any further, here is the code: casper.thenOpen('https://soundcloud.com/', function() { casper.click('.header__login'); popup = /soundcloud\.com\/connect/; casper.waitForPopup(popup, function() { casper.withPopup(popup, function() { selectors = { '#username': username, '#password': password }; casper.fillSelectors(