I've been trying to click on the open button but there a bunch of "opens" on the page. I tried using the xpath because there was a little difference but it still isnt clicking it once I get to that page this is what I have so far need some help please.
This is the code:
This is the error message I keep getting:
CodePudding user response:
It is highly recommended that you put the codes in text format instead of image so better readability.
I noticed that the issue you are facing is likely due to typo.
//*[@id='pack-container'']/li[1]/div[2]/button[1]
You have an additional apostrophe / single quote in the ID. It should be
//*[@id='pack-container']/li[1]/div[2]/button[1]
CodePudding user response:
driver.find_element_by_xpath(
"//*[@id='pack-container']/li[1]/div[2]/button[1]").click()
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id='pack-container']/li[1]/div[2]/button[1]"} (Session info: chrome=108.0.5359.125)