<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to patches</title><link href="https://sourceforge.net/p/pamie/patches/" rel="alternate"/><link href="https://sourceforge.net/p/pamie/patches/feed.atom" rel="self"/><id>https://sourceforge.net/p/pamie/patches/</id><updated>2009-04-17T04:13:50Z</updated><subtitle>Recent changes to patches</subtitle><entry><title>Execute javascript against the correct frame.</title><link href="https://sourceforge.net/p/pamie/patches/5/" rel="alternate"/><published>2009-04-17T04:13:50Z</published><updated>2009-04-17T04:13:50Z</updated><author><name>Richard Esplin</name><uri>https://sourceforge.net/u/resplin/</uri></author><id>https://sourceforge.net2b01dd1ecd7a664d23aedef86d82f2cf0224289d</id><summary type="html">execScript must be called against the frame which contains the function to be
executed. This change makes executeJavascript use the frameName to select the
correct frame for executing the script.

Below is a diff. The attached file contains my previous patch as well.

diff -r 89767a5f9132 -r a9db25bd3fa6 lib/PAM30.py
\--- a/lib/PAM30.py      Wed Apr 15 21:04:25 2009 -0600
+++ b/lib/PAM30.py      Thu Apr 16 22:06:51 2009 -0600
@@ -400,11 +400,14 @@
"""
self.\_wait\(\)
try:
\-            doc = self.\_ie.Document
\+            if self.frameName:
\+              doc = self.\_ie.Document.frames\[self.frameName\].Document
\+            else:
\+              doc = self.\_ie.Document
pw = doc.parentWindow
script = name
print \("script"\),script
\-            pw.execScript\(script\)
\+            pw.execScript\(script, 'JavaScript'\)
except:
\(ErrorType,ErrorValue,ErrorTB\)=sys.exc\_info\(\)
print \(sys.exc\_info\(\)\)
</summary></entry><entry><title>Detect HTML button tag</title><link href="https://sourceforge.net/p/pamie/patches/4/" rel="alternate"/><published>2009-04-16T03:12:57Z</published><updated>2009-04-16T03:12:57Z</updated><author><name>Richard Esplin</name><uri>https://sourceforge.net/u/resplin/</uri></author><id>https://sourceforge.netce21255763ca2dc9c5f2089405e6e10fbc5329f0</id><summary type="html">Detect HTML button tags in addition to input type=button. Based on version 3.0.

diff -r 73bcacdced9c -r 89767a5f9132 lib/PAM30.py
\--- a/lib/PAM30.py      Wed Apr 15 14:51:02 2009 -0600
+++ b/lib/PAM30.py      Wed Apr 15 21:04:25 2009 -0600
@@ -434,11 +434,11 @@
val = val.replace\( "\!", "", 1\)
myRE = re.compile\(val\)
regEx = True
\-
\+
if elementList:
\+            elements = elementList
if tag:
elements = self.getElementsList\(tag, "tagName=" + tag, elementList\)
\-
if isinstance\(val, int\):        \# Do we want the index?
return elements\[val\]
else:
@@ -630,11 +630,12 @@
The button if found, else None
"""
myElements = self.getElementsList\("input", "type=submit;type=button"\)
\+        myElements.extend\(self.getElementsList\("button"\)\)

if isinstance\(name, int\):
\-            foundElement = self.findElementByIndex\("input", name, None, myElements\)
\+            foundElement = self.findElementByIndex\("", name, None, myElements\)
else:
\-            foundElement = self.findElement\("input", "id;name;value", name, myElements\)
\+            foundElement = self.findElement\("", "id;name;value", name, myElements\)

if foundElement == None:
if self.showDebugging: print \("\*\* getButton\(\) did not find " + name\)
@@ -919,6 +920,7 @@
\(att1=val1;att2=val2\), ie. "type=checkbox;checked=True"
returns:
A filtered list of the found elements
\+            If an elementList is provided, the tag is ignored
"""
self.\_wait\(\)
</summary></entry><entry><title>Parse more URL elements</title><link href="https://sourceforge.net/p/pamie/patches/3/" rel="alternate"/><published>2007-01-09T20:59:34Z</published><updated>2007-01-09T20:59:34Z</updated><author><name>Anonymous</name><uri>https://sourceforge.net/u/userid-None/</uri></author><id>https://sourceforge.netf2b4afe0e58f7913fd1be436382672ba3a29cab3</id><summary type="html">This patch enables elementsGetList to identify elements with an equals sign in their attribute.  Many hrefs have equals signs in them.</summary></entry><entry><title>catch UnicodeEncodeError exception</title><link href="https://sourceforge.net/p/pamie/patches/2/" rel="alternate"/><published>2006-12-27T20:09:06Z</published><updated>2006-12-27T20:09:06Z</updated><author><name>Nick Jacobson</name><uri>https://sourceforge.net/u/nickjacobson/</uri></author><id>https://sourceforge.net5a4add0cc1002fb88fde3fa45ad3849222d7dbea</id><summary type="html">In the elementsGetList method, sometimes a UnicodeEncodeError exception can be thrown when parsing through page elements. e.g. "UnicodeEncodeError: 'ascii' codec can't encode character u'\xae' in position 14:
ordinal not in range\(128\)"

This patch catches that exception and marks that element as a nonmatch.  That way the program can keep running.
</summary></entry><entry><title>PAMIE enchancements patch</title><link href="https://sourceforge.net/p/pamie/patches/1/" rel="alternate"/><published>2004-06-17T14:37:34Z</published><updated>2004-06-17T14:37:34Z</updated><author><name>Mike Hostetler</name><uri>https://sourceforge.net/u/thehaas/</uri></author><id>https://sourceforge.net43b9aac2222ab6cc4fe231e92bdc50094ee1e5b8</id><summary type="html">Here is a patch that I made to PAMIE that has my
changes in it. 

1.\) Sometimes link names have a space in them, so if
you do an ie.ClinkLink\("name"\), it won't click.  This
patch does a .strip\(\) on all the link names.

2.\) I wanted to read the content of a certain tag. 
Fortunately, BeautifulSoup does a great job of parsing
horrid HTML.  You can get it here:

http://www.crummy.com/software/BeautifulSoup/

This patch contains a method called GetTagContents that
gets the content of the nth tag.  IOW:
ie.GetTagContents\('td',6\)

Will get the content of the sixth 'td' tag in the page.
GetTagContents uses the BeautifulSoup parser \(which is
only one file you need to drop in\).</summary></entry></feed>