'How to identify this element using selenium and Python?

I have tried to select the element below using xpath, id, class, nothing is working. This is the error message:

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="ui-id-26"]"}

HTML code of the element:

<a title="" href="#8eef8ef4-7cfc-4cb6-69cf-1cabf9625d74" class="ui-tabs-anchor" role="presentation" tabindex="-1" id="ui-id-26">Data</a>

Snapshot of the element:

the element I want to select and eventually click

I am using python.

This is my code:

from selenium import webdriver
from selenium.webdriver.common.by import By
import time
chromedriver = 'C:/Users/misha/Downloads/chromedriver_win32/chromedriver'

driver = webdriver.Chrome(chromedriver)
driver.get("https://login.cmegroup.com/sso/accountstatus/showAuth.action")
driver.maximize_window()
login = driver.find_element(By.ID, "loginBtn")

name = driver.find_element(By.ID, "user")
name.send_keys("MyEmail")
pwd = driver.find_element(By.ID, "pwd")
pwd.send_keys("MyPassword")
login.click()

time.sleep(15)

driver.get('https://www.cmegroup.com/trading/fx/cme-fx-market-profile-tool.html#analyze-more')


data = driver.find_element(By.XPATH,'//*[@id="ui-id-26"]')

data.click()




Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source