PythonFanatic999
PythonFanatic999

Reputation: 33

Why is webelement not showing up in selenium? Regardless of find method

screenshot

I am trying to locate the "Confirm Booking" button in selenium. My driver is on the current webpage and we can see in the html that the button is of class "menubutton". Yet when I iterate through all elements of that class it only locates the "Return to timetable" button. As you can see in the terminal output.

My code is as follows:

#confirms booking
elems = driver.find_elements(By.CLASS_NAME, 'menubutton')
print(len(elems))
for e in elems:
    print(e.text)

I have also tried locating by XPATH but it only finds the "Return to Class Timetable" button.

Any help would be appreciated!

Upvotes: 0

Views: 162

Answers (0)

Related Questions