An announcement exists on the site here, but I tried to click on it, but it just didn't work.
<ahref="javascript:void(0)">Notices</a> via driver.find_element_by_xpath
I tried to connect this part, but it didn't work either.
I'm not making any progress here, so please give me a separate solution or advice.
python selenium javascript
If I were you, I would stop trying to find that tag a and just turn to get the final purpose notice.
In the first place, javascript:void(0)
means "Do nothing!" It's more like a legacy of old-fashioned web development where inline scripts were considered good ideas, and element click events could not be handled gracefully with separate scripts. Therefore, trying to find and click tag a somehow can be a waste of effort. This is because you can't tell what happens when you click on it. The hidden notice may pop up, pages or pop-ups may pop up, or not all three.
Why don't you try to replicate that incident by focusing on what actually happens when you click on that element? It doesn't seem very likely that it's possible only if you click on that element.
© 2024 OneMinuteCode. All rights reserved.