Unable to locate an element using Python Selenium library

帅比萌擦擦* 提交于 2021-01-29 13:31:08

问题


I'm not able to find an element again. I've been learning... I've already looked for the solutions seeing past questions but the answer depends on the specify code.

The name of the button is "Gestione" and when you click it, you should be able to see a drop-down menù.

SELECTORS BY SELENIUM IDE

id=ext-gen76
css=#ext-gen76
xpath=//em[@id='ext-gen76']
xpath=//tr[@id='ext-gen43']/td[2]/em
xpath=//td[5]/table/tbody/tr/td[2]/em
xpath=//em[contains(.,'Gestione')]

HTML CODE

HTML page 1

HTML page 2

Sorry if I didn't copy it in an ordinary way but it's too long.

ATTEMPTS

browser.find_element_by_css_selector('#ext-gen76').click()

browser.find_element_by_id('ext-gen76').click()

browser.find_element_by_xpath('//td[5]/table/tbody/tr/td[2]/em').click()

Maybe, it might be an iframe problem... if this is the case, could you help me to understand how I can find 'em without problems for the next times?

If you helped me, I would be very grateful...

来源:https://stackoverflow.com/questions/64660559/unable-to-locate-an-element-using-python-selenium-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!