I've written web scraping scripts that worked in the past however I'm running into something new that I can't figure out on TradingView. There are buttons in the chart that don't seem like buttons, at least the code is not able to press it. I've attached the code from one of these buttons.
<div class="control-bar control-bar__btn control-bar__btn--back-present apply-common-tooltip control-bar__btn--btn-hidden" style="bottom: 33px; margin-right: 72px;" xpath="1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14"><path fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="2" d="M6.5 1.5l5 5.5-5 5.5M3 4l2.5 3L3 10"></path></svg>
</div>
I've taken a screenshot also as Firefox shows event
and flex
in the code which I'm sure is relevant.
Using
driver.find_element_by_xpath("//div[@class='control-bar control-bar__btn control-bar__btn--back-present apply-common-tooltip']").click()
doesn't work. I also tried using CSS. Any help is greatly appreciated.