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" )
But am getting the following error. Traceback (most recent call last):
File "C:\pamie\MyTest.py", line 8, in ?
ie = PAMIE( )
TypeError: 'module' object is not callable
Can any one tell me the reason for this failure.Is there any other open source tool which uses python for Web testing.
Thanks,
Aswin.
6 7708
If cPAMIE is a module and there is function or class in it named PAMIE, call that function or class like this:
import cPAMIE
cPAMIE.PAMIE()
If you
import cPAMIE as PAMIE
then it's:
PAMIE.PAMIE()
which can get confusing.
Another thing that is useful, but is often discouraged is
from cPAMIE import *
which means import all names form the module into the current namespace.
You can then simply call:
PAMIE().
Have fun!
Hi All,
someone please help me with this.. I have just set up PAMIE cPAMIE.pyc etc in the Python24 root which is not explained anywhere.. So I'm not even sure if I have that set up correctly (but IE opens so I assume its right). My biggest problem at the mo is this..
C:\>PamieTEST.py
Traceback (most recent call last):
File "C:\PamieTEST.py", line 8, in ?
ie.Navigate("http://10.3.0.60/")
AttributeError: PAMIE instance has no attribute 'Navigate'
the code is below
from winGuiAuto import win32gui
from cPAMIE import PAMIE
from cModalPopUp import handlePopup
import time,os,sys,os.path
ie = PAMIE()
ie.Navigate("http://10.3.0.60/")
Why is this happening, is my module incorrectly set or do I need to install something else. Can someone also point me to some documentation explaining how to actually set up new modules in Python so I don't have to trial and error every tedious thing.
Thanks,
easy
Here is a link to a previous discussion.
I haven't tested this: - # To use Pamie you must first create a new script or text file that you can saveas mytest.py.
-
-
# This will import the cPAMIE class file so you can use it's methods
-
-
from cPAMIE import PAMIE
-
-
# create a new instance of the PAMIE object
-
-
ie = PAMIE( )
-
-
# Lets navigate to google - this methods takes a string as the URL
-
-
ie.navigate("'www.google.com" )
-
-
ie.textBoxSet("q", "python" ) #control name, value
-
-
# Now Submit the form.
-
-
ie.buttonClick("'btnG" )
-
but it should work now after changing "Navigate" to "navigate". this site's documentation has not been updated lately and has no "feedback" area for me to get them to fix it.
Hi All,
someone please help me with this.. I have just set up PAMIE cPAMIE.pyc etc in the Python24 root which is not explained anywhere.. So I'm not even sure if I have that set up correctly (but IE opens so I assume its right). My biggest problem at the mo is this..
C:\>PamieTEST.py
Traceback (most recent call last):
File "C:\PamieTEST.py", line 8, in ?
ie.Navigate("http://10.3.0.60/")
AttributeError: PAMIE instance has no attribute 'Navigate'
the code is below
from winGuiAuto import win32gui
from cPAMIE import PAMIE
from cModalPopUp import handlePopup
import time,os,sys,os.path
ie = PAMIE()
ie.Navigate("http://10.3.0.60/")
Why is this happening, is my module incorrectly set or do I need to install something else. Can someone also point me to some documentation explaining how to actually set up new modules in Python so I don't have to trial and error every tedious thing.
Thanks,
easy
I broke down and unzipped cPAMIE tonight. Since you can import it there is no issue there, but I put things like this in D:\Python24\Lib\site-packages. site-packages are not disturbed when you update python and most msi's unpack there. The problem is that some smart-alec changed the name to 'navigate' (small "n"). Have fun!
Honestly, people, there really is an easyrider27. He/she is just not a member yet. I'm not going crazy or posting the hear the sound of my own keyboard. This clever person figured out how to post a question without signing up. I have high hopes that this person will become a member of our community, as we need all the clever people we can get posting in this forum.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Phillip J. Eby |
last post by:
PEP: 333
Title: Python Web Server Gateway Interface v1.0
Version: $Revision: 1.1 $
Last-Modified: $Date: 2004/08/27 17:30:09 $
Author: Phillip J. Eby <pje at telecommunity.com>
Discussions-To:...
|
by: Xah Lee |
last post by:
http://python.org/doc/2.4.1/lib/module-re.html
http://python.org/doc/2.4.1/lib/node114.html
---------
QUOTE
The module defines several functions, constants, and an exception. Some
of the...
|
by: calfdog |
last post by:
I am pleased to announce version cPAMIE 1.6 the Web automation tool for
Internet explorer.
If your looking for a fast way, easy to learn way to drive your browser
check out PAMIE.
Is PAMIE...
|
by: Joakim Persson |
last post by:
Hello all. I am involved in a project where we have a desire to
improve our software testing tools, and I'm in charge of looking for
solutions regarding the logging of our software (originating...
|
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....
|
by: Silgd1 |
last post by:
Hey everyone,
I'm trying to automate a webpage using cPamie in conjection with python 2.4. I can get to the page and login. when I try to click the login button, I receive an out of index error....
|
by: romo20350 |
last post by:
Hi, I'm in need of help with cPAMIE. I'm currently trying to submit
this form on a webpage:
<form action="" method="post">
<fieldset>
<legend>Submit Coupon</legend>
<label...
|
by: jloyzaga |
last post by:
import sys
import cPAMIE
url = sys.argv
dom = cPAMIE.PAMIE(url)
how can I maximize the current active browser?
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
|
by: Naresh1 |
last post by:
What is WebLogic Admin Training?
WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
|
by: ezappsrUS |
last post by:
Hi,
I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
|
by: DizelArs |
last post by:
Hi all)
Faced with a problem, element.click() event doesn't work in Safari browser.
Tried various tricks like emulating touch event through a function:
let clickEvent = new Event('click', {...
|
by: F22F35 |
last post by:
I am a newbie to Access (most programming for that matter). I need help in creating an Access database that keeps the history of each user in a database. For example, a user might have lesson 1 sent...
| |