Hello, I'm using win32com.client to control an IE instance in Python. How can I click a link on a certain page (e.g. using navigate to link href isn't acceptable since it won't trigger referer sending)? Here is the base:
import random
import time
from win32com.client import Dispatch
ie = Dispatch("InternetExplorer.Application")
ie.visible = 1
ie.navigate('http://digg.com')
while (ie.ReadyState != 4):
time.sleep(0.05)
hrefs = ie.document.getElementsByTagName("A")
href = hrefs[random.randrange(hrefs.length)]
#How to click this one?