want to take a text file (which has a list of urls) and have my script go through them 1 by one using Firefox. 
<div> </div>
<div>So for instance, if the first two urls in my list were: </div>
<div><a title="http://www.google.com" onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.google.com/" target="_blank">www.google.com</a></div>
<div><a title="http://www.amazon.com" onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.amazon.com/" target="_blank">www.amazon.com</a></div>
<div> </div>
<div>I would want to spawn firefox and load <a title="http://www.google.com" onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.google.com/" target="_blank">www.google.com</a>. Once google loads, I would like to kill Firefox and restart it, this time with 
<a title="http://www.amazon.com" onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.amazon.com/" target="_blank">www.amazon.com </a>loaded. I am basically running a stress test on a browser based product.
</div>
<div> </div>
<div>I have been able to do this in IE with no problems (Calling IE's COM object).I also have used the PAMIE module without a problem in IE. The problem is Firefox uses XPCOM and I have never worked with XPCOM, and thus havent worked with PyXPCOM before. Any insight will help. 
</div>
<div> </div>
<div>FYI: I did try writing a script which loads firefox from the command line and navigates to a site, but once I try to kill Firefox and move to the next url nothing happens:</div>
<div> </div>
<div>import os</div>
<div>import time</div>
<div> </div>
<div>file = open("C:\urls.txt")</div>
<div> </div>
<div>for x in file:</div>
<div>   </div>
<div>   firefox = "C:\progra~1\mozill~1\firefox.exe "</div>
<div>   firefox = firefox + x</div>
<div>   os.system(firefox)</div>
<div>   time.sleep(10)</div>
<div>   taskkill = "taskkill /f /im firefox.exe"</div>
<div>   os.system(taskkill)</div>
<div> </div>
<div>file.close<span></span> ()<br> </div>