So I’m trying to click a button that opens a workStart and that inside has a little form with some details and two options to click.
So a little diagram would be:
User opens a website -> Fills some data to log in -> clicks a button that opens the panel mentioned below -> finalize it validating pressing the “Validate” button.
^
this is where I am now, all the process of filling data and logging in has been done correctly.
entryButton = "/html/body/div[2]/div[2]/div/div[2]/div[2]/div[1]/div[2]"
validateButton = "/html/body/div[1]/form/div[5]/button[1]"
The thing I’m trying to do is passing the XPath mentioned above of both buttons and trying to click them by their XPath but the second one is not working because Selenium can’t find it. I think it is because in the main HTML the second XPath I passed selenium doesn’t exist and it’s processed once we click the first button but again, I’m not sure on how to solve it
Here’s the error by Selenium:
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {“method”:”xpath”,”selector”:”/html/body/div[1]/form/div[5]/button[1]”}