I'm using Appium client to record and generate the testing script for my iOS App. On the App Inspector, I can tap on a login button and generate the script (in python) like below:
els1 = driver.find_elements_by_accessibility_id("login")
els1[0].click()
I can successfully log in to my app tapping the button on the App Inspector yet I got an error as I run the script on mac terminal:
els3[0].click()
IndexError: list index out of range
I tried different ways to access the button element by using accessibility id, name and class name, but none of the above work.
What did I miss? Is it a bug of the Appium software?