I need help with writing "If,else,endif" commands

Hello i created a test suite about “amazon website” to buy items and the last command is click at button. After pressing this button, there are 2 possibilities. To be transferred to a password entry page, or to a page to complete the purchase, i need one to help me to make a “If,else,endif” to make the test suite run at the 2 possibilities.