replaced a wait with a waitForSelector