this locator is unreliable because the menu options differ.
I would try something like xpath: `ul/li[button[@data-action='cancel']]