<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
On 1:59 PM, Pat McGuire wrote:
<blockquote
cite="mid:%3CBAY134-W701289DB5304F75415F88B81A0@phx.gbl%3E"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
<br>
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
</style>I am new at programming with Python and am using Pythonwin. I
have a couple of questions'<br>
<br>
1. The code below after doc.FormName.submit() will navigate to
the correct page but if I print the url it shows the url of the
page I logged in at. I thought submit would be just like if I
clicked on the submit button.<br>
<br>
import win32com.client<br>
import win32api<br>
ie = win32com.client.Dispatch( "InternetExplorer.Application" )<br>
ie.Visible = 1<br>
ie.Navigate("<a moz-do-not-send="true"
href="http://posting.www.backpage.com/classifieds/central/index"
target="_blank">urlhere</a>")<br>
while ie.Busy == True:<br>
win32api.Sleep(1000)<br>
doc = ie.Document<br>
doc.FormName.email.value = "<a moz-do-not-send="true"
href="mailto:doublepllc@gmail.com">emailaddress</a>" <br>
doc.FormName.password.value = "mypassword"<br>
doc.FormName.submit()<br>
<br>
2. Can you point me to a site that which show me how to access
each type of form element, i.e. option, hrefs, links, etc<br>
<br>
<br>
Any help is greatly appreciated.<br>
<br>
</blockquote>
<br>
I've heard good things about Mechanize:
<a class="moz-txt-link-freetext" href="http://mechanize.rubyforge.org/mechanize/">http://mechanize.rubyforge.org/mechanize/</a><br>
<br>
It's not PyWin32, but it's probably easier to use than win32com
methods.<br>
<br>
<br>
<br>
<div class="moz-signature">-- <br>
Mike Driscoll
<br>
<br>
</div>
</body>
</html>