[pywin32-bugs] [ pywin32-Bugs-3562879 ] win32com and PAMIE 3
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: SourceForge.net <no...@so...> - 2012-09-16 23:55:04
|
Bugs item #3562879, was opened at 2012-08-29 08:34 Message generated for change (Comment added) made by mhammond You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3562879&group_id=78018 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: com Group: None >Status: Open Resolution: None Priority: 5 Private: No Submitted By: Raveesh (spaniard81) Assigned to: Nobody/Anonymous (nobody) Summary: win32com and PAMIE 3 Initial Comment: I am trying to run the Simple Example to automate a google search on "Python" http://mail.python.org/pipermail/python-announce-list/2009-March/007279.html ###################################################### from PAM30 import PAMIE ie = PAMIE() ie.navigate("google.com") ie.setTextBox("q", "python") ie.clickButton("Google Search") ie.clickLink("Python Programming Language -- Official Website") ###################################################### I have the exact same setup as mentioned in the note by Rob Marchetti. Note:This version only only works with Python 3.0 on Windows and requires Mark Hammond's pywin32 for Python3.0 - pywin32-213.win32-py3.0.exe But i get the following error: TypeError: getElementsByTagName() takes exactly 1 positional argument (2 given) Details: Traceback (most recent call last): File "testPAM.py", line 10, in <module> ie.setTextBox("q", "python") File "C:\Users\raveesh\Dropbox\myCode\SSSB\PAM30.py", line 2093, in setTextBox foundElement = self.getTextBox(name) File "C:\Users\raveesh\Dropbox\myCode\SSSB\PAM30.py", line 1717, in getTextBox foundElement = self.findElement("input", "id;name;value", name) File "C:\Users\raveesh\Dropbox\myCode\SSSB\PAM30.py", line 445, in findElement elements = self.getElementsList(tag) File "C:\Users\raveesh\Dropbox\myCode\SSSB\PAM30.py", line 939, in getElementsList elements = self._ie.Document.getElementsByTagName(tag) TypeError: getElementsByTagName() takes exactly 1 positional argument (2 given) Python on my machine: Python 3.0.1 (r301:69561, Feb 13 2009, 20:04:18) [MSC v.1500 32 bit (Intel)] on win32 The bug has also been reported on http://stackoverflow.com/questions/11580340/typeerror-with-pamie with no solution! ---------------------------------------------------------------------- >Comment By: Mark Hammond (mhammond) Date: 2012-09-16 16:55 Message: I'll try and look into this soon. ---------------------------------------------------------------------- Comment By: Jérome Laheurte (fraca7) Date: 2012-09-16 02:20 Message: This is still "pending"... Should I open another bug report for my own situation ? ---------------------------------------------------------------------- Comment By: Jérome Laheurte (fraca7) Date: 2012-08-30 04:51 Message: This has nothing to do with Python 3 or PAM. I get the same error using this script (with Python 2.2, win32all build 210, as well as Python 2.5 and win32all build 217). It only happens with MSIE 9. Fun thing is that on a site like Baidu (commented line here), which uses compatibility mode IFAIK, it works. Tested on Win7 Ultimate 32 bits. import win32com.client import time ie = win32com.client.Dispatch('InternetExplorer.Application.1') try: ie.Visible = 1 ie.Navigate("http://www.google.com") # ie.Navigate("http://www.baidu.com") while ie.Busy: time.sleep(1) print ie.Document.getElementsByTagName("a") finally: ie.Quit() ---------------------------------------------------------------------- Comment By: Raveesh (spaniard81) Date: 2012-08-30 02:22 Message: i am running this on a 64bit Win7, Intel machine, if that has anything to do with this. ---------------------------------------------------------------------- Comment By: Raveesh (spaniard81) Date: 2012-08-30 02:21 Message: Hi, following you suggestion i upgraded to Python 3.x. Here is the exact version: Python 3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)] on win32 And i have installed pywin32-217.win32-py3.2 from sourceforge I still get the same TypeError: getElementsByTagName() takes exactly 1 positional argument (2 given) ---------------------------------------------------------------------- Comment By: Roger Upole (rupole) Date: 2012-08-29 09:03 Message: The first thing to try is using a newer version of Python 3. There were enough problems with Python 3.0 that pywin32 is no longer released for it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=551954&aid=3562879&group_id=78018 |