Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am using selenium to help download files. I run into an issue where I cannot click on this dropdown menu. I have tried searching ID and xpath, but python is spitting out 'no such element' error.

XPATH below:

//*[@id="ReportViewerCtl_ctl05_ctl04_ctl00_ButtonImg"]

HTML:

<img id="ReportViewerCtl_ctl05_ctl04_ctl00_ButtonImg" src="/Reserved.ReportViewerWebControl.axd?OpType=Resource&amp;Version=11.0.3452.0&amp;Name=Microsoft.Reporting.WebForms.Icons.Export.gif" alt="Export drop down

Have tried:

driver.find_element_by_id("ReportViewerCtl_ctl05_ctl04_ctl00_ButtonImg").click() 
driver.find_element_by_xpath('//*[@id="ReportViewerCtl_ctl05_ctl04_ctl00_ButtonImg"]').click()

Thank you in advance for all of the help! Just getting started with python.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
3.9k views
Welcome To Ask or Share your Answers For Others

1 Answer

等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...