473,326 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Python / PAMIE

Can someone help with a PAMIE issue? I'm new to Python / PAMIE and
they seem like great tools but to be honest I'm finding that no
responses to questions can be found (Experts Exchange, etc.) I'm
hoping this will be the place.

I tried to duplicate the authors "ie.writeScript" function shown at

http://showmedo.com/videos/video?nam...romSeriesID=25

I get "Attribute not found." I found one reference to where the
command was written as "ie.scriptWrite" but that does not work either.

I've emailed the author, Experts Exchange and other sites with ZERO
responses.

Can someone PLEASE assist?

THNX
Jul 24 '08 #1
5 3197
frankrentef wrote:
Can someone help with a PAMIE issue? I'm new to Python / PAMIE and
they seem like great tools but to be honest I'm finding that no
responses to questions can be found (Experts Exchange, etc.) I'm
hoping this will be the place.

I tried to duplicate the authors "ie.writeScript" function shown at

http://showmedo.com/videos/video?nam...romSeriesID=25
I'd rather you posted the code you've tried.
I'm not too keen on viewing a video just to get
hold of a piece of code, and in any case that
would only show me what the author's done.

We need to see what you've done, and what the
traceback was. Would you mind posting some code,
please?

Thanks

TJG
Jul 24 '08 #2
frankrentef wrote:
Can someone help with a PAMIE issue? I'm new to Python / PAMIE and
they seem like great tools but to be honest I'm finding that no
responses to questions can be found (Experts Exchange, etc.) I'm
hoping this will be the place.

I tried to duplicate the authors "ie.writeScript" function shown at

http://showmedo.com/videos/video?nam...romSeriesID=25
I'd rather you posted the code you've tried.
I'm not too keen on viewing a video just to get
hold of a piece of code, and in any case that
would only show me what the author's done.

We need to see what you've done, and what the
traceback was. Would you mind posting some code,
please?

Thanks

TJG
Jul 24 '08 #3
On Jul 24, 10:07*am, Tim Golden <m...@timgolden.me.ukwrote:
frankrentef wrote:
Can someone help with a PAMIE issue? *I'm new to Python / PAMIE and
they seem like great tools but to be honest I'm finding that no
responses to questions can be found (Experts Exchange, etc.) *I'm
hoping this will be the place.
I tried to duplicate the authors "ie.writeScript" function shown at
http://showmedo.com/videos/video?nam...mie3&fromSerie....

I'd rather you posted the code you've tried.
I'm not too keen on viewing a video just to get
hold of a piece of code, and in any case that
would only show me what the author's done.

We need to see what you've done, and what the
traceback was. Would you mind posting some code,
please?

Thanks

TJG
THNX for your response. Based on the authors code it's very simple.

from cPAMIE import PAMIE
ie=PAMIE ()

#ie.navigate ("google.com")

#ie.linkClick
#ie.textBoxSet
#ie.writeScript

ie.navigate ('https://login.yahoo.com/config/mail?.intl=us')
#ie.scriptWrite ()

ie.scriptWrite()
Below is the error I get...

File "C:\Python24\lib\site-packages\cPAMIE.py", line 1837, in
scriptWrite
nameProp = getattr(x,"nameProp")
File "C:\Python24\Lib\site-packages\win32com\client\dynamic.py",
line 500, in __getattr__
raise AttributeError, "%s.%s" % (self._username_, attr)
AttributeError: <unknown>.nameProp
Jul 24 '08 #4
frankrentef wrote:
THNX for your response. Based on the authors code it's very simple.

from cPAMIE import PAMIE
ie=PAMIE ()

#ie.navigate ("google.com")

#ie.linkClick
#ie.textBoxSet
#ie.writeScript

ie.navigate ('https://login.yahoo.com/config/mail?.intl=us')
#ie.scriptWrite ()

ie.scriptWrite()
Below is the error I get...

File "C:\Python24\lib\site-packages\cPAMIE.py", line 1837, in
scriptWrite
nameProp = getattr(x,"nameProp")
File "C:\Python24\Lib\site-packages\win32com\client\dynamic.py",
line 500, in __getattr__
raise AttributeError, "%s.%s" % (self._username_, attr)
AttributeError: <unknown>.nameProp

I'm afraid I'm no IE expert (read: never use it if I can
avoid it) but I suspect here a combination of slightly
flaky code in the Python module plus, maybe, a change in
the IE dom object model.

If you change lines 1832-1836 of cPAMIE.py to be as follows:

<patch>
for j in range(doc.length):
x = doc[j]
etype = getattr(x,"type", "")
name = getattr(x,"name", "")
nameProp = getattr(x,"nameProp", "")

</patch>
then at least some kind of output is produced. But I'm
not entirely sure what this function is trying to achieve
so I don't guarantee it's doing the right thing yet.

TJG
Jul 24 '08 #5
On Jul 24, 10:45*am, Tim Golden <m...@timgolden.me.ukwrote:
frankrentef wrote:
THNX for your response. *Based on the authors code it's very simple.
from cPAMIE import PAMIE
ie=PAMIE ()
#ie.navigate ("google.com")
#ie.linkClick
#ie.textBoxSet
#ie.writeScript
ie.navigate ('https://login.yahoo.com/config/mail?.intl=us')
#ie.scriptWrite ()
ie.scriptWrite()
Below is the error I get...
*File "C:\Python24\lib\site-packages\cPAMIE.py", line 1837, in
scriptWrite
* * nameProp = getattr(x,"nameProp")
* File "C:\Python24\Lib\site-packages\win32com\client\dynamic.py",
line 500, in __getattr__
* * raise AttributeError, "%s.%s" % (self._username_, attr)
AttributeError: <unknown>.nameProp

I'm afraid I'm no IE expert (read: never use it if I can
avoid it) but I suspect here a combination of slightly
flaky code in the Python module plus, maybe, a change in
the IE dom object model.

If you change lines 1832-1836 of cPAMIE.py to be as follows:

<patch>
* * * * * * for j in range(doc.length):
* * * * * * * * x = doc[j]
* * * * * * * * etype = getattr(x,"type", "")
* * * * * * * * name = getattr(x,"name", "")
* * * * * * * * nameProp = getattr(x,"nameProp", "")

</patch>

then at least some kind of output is produced. But I'm
not entirely sure what this function is trying to achieve
so I don't guarantee it's doing the right thing yet.

TJG- Hide quoted text -

- Show quoted text -
The idea is to run through a given url, detect any "form fields" that
require populating and build a script listing the field names, etc.
From there a PAMIE user can take the script returned and build a test
case. In other words the user does not have to search through the
HTML code for all the field names (blanks) radio button names, etc.

It works "great" on the video tutorial but dang if I or any of our
senior guys can get it to work here in house. THNX for input, we'll
give it a try.
Jul 24 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: scrimp | last post by:
Ive been using PAMIE 1.4 to try to automate web page processes. The one thing I cannot do with it is upload files and download files. With uploading files, the file input box does not allow PAMIE...
1
by: Sam R | last post by:
Hi, I am new to Python, and PAMIE has been a very useful tool for my website functionality testing. I was wondering if anyone knows how to do the following testcases with either PAMIE or Python....
0
by: saltima | last post by:
Hi all, I'm trying to automate my web browser testing by using Pamie and Python. Everything is going great except for when a new window opens up. (on the previous page, I click next, and a...
6
by: Aswin | last post by:
Hi, I just tried to run a sample test by the following script: import cPAMIE as PAMIE ie = PAMIE( ) ie.Navigate("'www.google.com" ) ie.textBoxSet("q", "python" ) ie.buttonClick("'btnG" )
1
by: pearturtle123 | last post by:
Hi, I am new to Python and I am using PAMIE to manipulate IE browser. Currently, I have IE window 1 launched, after I clicked on a link on window 1, a second IE window 2 isopened. Then, I want...
1
by: Jorgen Bodde | last post by:
Hi All, I am at a loss. This is slightly OT because it concerns Windows and HTML printing. I would like to print a HTML document from Python, but not showing the printing dialog. After numerous...
0
by: frankrentef | last post by:
Greetings All, New to Python and even newer to PAMIE. I'm trying to execute the "scriptWrite" function to work in PAMIE but get the message "parameter not found." As I understand it the...
1
by: frankrentef | last post by:
Greetings all. I'm new to PAMIE and I've watched / followed to PAMIE videos on Show me Do. I've tried to duplicate the "scriptWrite" function in an attempt to automate the forms process... without...
5
by: frankrentef | last post by:
Newbie needs detailed help on an issue involving the use of a popup (Java) window. Simply I need to fire / activate the "OK" portion of the window. I'm using Pamie to generate automated testing...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.