Fix api automate test