I am trying to click the pagination links (next button). However the click goes to the site homepage. I am targeting the element by class. What could be wrong ?
driver.get('https://www.marinetraffic.com/en/data/?asset_type=vessels&columns=flag,shipname,photo,recognized_next_port,reported_eta,reported_destination,current_port,imo,ship_type,show_on_live_map,time_of_latest_position,lat_of_latest_position,lon_of_latest_position¤t_port_in|begins|FUJAIRAH%20ANCH|current_port_in=20585')
# Wait 30 seconds for page to load
timeout = 30
try:
WebDriverWait(driver, timeout).until(EC.presence_of_element_located((By.CLASS_NAME, 'MuiButtonBase-root-60')))
element = driver.find_element_by_class_name('MuiButtonBase-root-60')
driver.execute_script("arguments[0].click();", element)
except TimeoutException:
print("Timed out waiting for page to load")
driver.quit()