But New Zealand eventually gave the lead back to Australia after Rhianon Dennison was dispossessed and the Hockeyroos scored their second through Brooke Peris in the 31st minute, which added to Anna Flanagan's earlier effort from a penalty corner.
As the weather took a turn for the worse, the Black Sticks managed to string a few passes together and evened the ledger when skipper Kayla Sharland's shot from the top of the circle was deflected in by Webster.
With the floodlights on and the rain falling, both sides went to halftime with the score at 2-2 and the Black Sticks had goalkeeper Sally Rutherford to thank for such a scoreline after she made a couple of fine saves in the first spell.
Both sides had penalty corner opportunities during the first 20 minutes of the second half before Flynn turned provider as Cocks scored on debut to net the winner with just over 10 minutes left.
Krystal Forgesson had the chance to kill the game off with seven minutes to go but her shot went wide with just the keeper to beat.
Earlier in the day, the men's Black Sticks beat Papua New Guinea 18-0, while the Australian men beat Samoa 32-0. On the women's side of the draw, Papua New Guinea beat Samoa 2-1.