The program works like this:
- I find an element by name
- I click on the element, and it makes the element in 3 appear
- I find the other element by link text
- I click on it.
The problem that I have is that 3 happens too quick and the program is unable to locate the element. I think I need to put a delay or something in 3 that activates 4 when the element is found. Also I'm using Selenium if that helps.
I haven't been able to try anything because I have no idea of what I can do, because I'm very new to this.
Here is the code:
atc = browser.find_element_by_name('commit')
atc.click()
checkout = browser.find_element_by_link_text('checkout now')
checkout.click()