How to simulate clicks on <a href= "https://stackoverflow.com/javascript:dosomething(12345)" rel="nofollow noreferrer"> text </a> using python?
4 answers
You can use iMacros in combination with Python ...
This is not a straightforward solution, since for this you need to write an iMacros script to actually click, and then load the page and call the script from Python.
Refereces:
+1
(, ID), javascript
var link = document.getElementById['yourLinksIdAttrbuteValue'];
link.click();
jQuery , ...
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<script>
$(function(){ $("a[href^='javascript']:contains('text')").click() });
</script>
JQuery google, dom .
0