0

使用 getElementById 在最后一行出现错误。是什么赋予了?

import win32com.client as client

import time

ie = client.Dispatch('InternetExplorer.Application.1')

ie.Visible = 1

ie.Navigate('www.myweb.it') 

while ie.Busy:
time.sleep(0.1)

while ie.Document.readyState != 'complete':
time.sleep(0.1)

click = ie.Document.getElementById('some_id').click() # here goes in error
4

1 回答 1

0

它应该工作。

 Ex.function test()
    {
        var hyperlink = document.getElementById('nameofid');
        hyperlink.onclick = "your code";
    }
于 2012-10-05T18:28:33.427 回答