【发布时间】:2022-01-20 15:11:55
【问题描述】:
这是我正在处理的网站https://www.bseindia.com/corporates/ann.html?curpg=1&annflag=1&dt=20211021&dur=P&dtto=20211027&cat=Insider%20Trading%20/%20SAST&scrip=&anntype=A 在这里,我可以发送“安全名称”的代码,但为了提交它,我需要单击提供安全名称后出现的下拉元素。我如何用硒实现这一目标。我使用了下面的代码,但它不起作用(StaleElementReferenceException)
security_name = driver.find_element_by_id("scripsearchtxtbx")
security_name.send_keys('INE350H01032')
sec_click = driver.find_element_by_xpath('//*[@id="ulSearchQuote2"]/li')
sec_click.click()
【问题讨论】:
标签: python selenium web-scraping