Could everyone help me solving the problem to click on a hyperlink in a HTML page that itself contains HTML element inside it's body( 4 level nested HTMLs)? I have tried different ways to address XPATH, but they couldn't being known during run. I use selenium, Python3.9, IE11( for this project is mandatory to use IE11).
Its full Xpath from the main HTML is:
/html/body/div[2]/div[2]/iframe/html/frameset/frame[2]/html/body/div/div[4]/div/iframe/html/body/div/div[@id='resultList']/div[2]/div[3]/table/tbody/tr/td[@id='resultList_0_3']/a
and I used this python code to access it:
web_driver.find_element_by_xpath("/html/body/div[2]/div[2]/iframe/html/frameset/frame[2]/html/body/div/div[4]/div/iframe/html/body/div/div[@id='resultList']/div[2]/div[3]/table/tbody/tr/td[@id='resultList_0_3']/a").click()
the output error is:
selenium.common.exceptions.NoSuchElementException: Message: Unable to find element with xpath == /html/body/div2/div2/iframe/html/frameset/frame2/html/body/div/div[4]/div/iframe/html/body/div/div[@id='resultList']/div2/div[3]/table/tbody/tr/td[@id='resultList_0_3']/a
and the same error for other elements searched by id, tag,...
B.S. when I try to access Xpath: /html/body/div[2]/div[2]/iframe
the selenium found the link successfully, but did not find after that level.