Python PAMIE module for IE Automation

Source: Internet
Author: User

The emergence of the Python programming language brings a different development experience to developers. Here, we will analyze the application methods and features of this programming language from an important Python PAMIE module, hoping to help you.

PAMIE is called Python automation Module For Internet Explorer. As its name suggests, PAMIE is a Module that implements IE automation. The official website of PAMIE provides download of the latest modules. However, due to personal development, other documents, FAQs, and other issues are not updated. After downloading the latest version, many of the materials provided on the home page are incorrect. You must pay attention to this when using the materials. The most obvious example is what I mentioned in the previous article, some methods have been replaced. Check PAM30.py for more information!

The following uses PAMIE Test Page as an example to illustrate the use of some basic methods.

In the latest version, the class name in PAM30.py has been changed to PAMIE. the previously used import cPAMIE or from cPAMIE import PAMIE will obviously fail. from PAM30 import PAMIE

Create a Python PAMIE module instance

Ie = PAMIE ()

Open webpage

Ie. navigate ('HTTP: // pamie.sourceforge.net/pamieform.html ')

To view the page source code when processing page elements, we recommend Internet Explorer Developer Toolbar, which is easy to locate and find web elements,

Text Box

Ie. setTextBox ('firstname', 'firstname ')

Ie. setTextBox ('lastname', 'lastname ')

Select the drop-down menu:

Ie. selectListBox ('state', "MS ")

Square selection box:

Ie. setCheckBox ('cxbx ', 1) #1 2 3 or * are all "checked" meaning ''Null String indicates unselected

Circle selection box:

Select Jazz

Ie. setRadioButton ("music", "Jazz") # music is the name of the selection list. Find it from the source code of the webpage.

Last submit button

Ie. clickButton ("Submit ")

The preceding section describes the Python PAMIE module.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.