Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Mozilla::Mechanize::GUITester 0.11

    Download button

    No screenshots available
    Downloads: 351  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Boris Sukholitko | More programs
    Perl Artistic License / FREE
    March 23rd, 2007, 05:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Mozilla::Mechanize::GUITester description

    Mozilla::Mechanize::GUITester is a Perl module that enhances Mozilla::Mechanize with GUI testing.

    Mozilla::Mechanize::GUITester is a Perl module that enhances Mozilla::Mechanize with GUI testing.

    SYNOPSIS

    use Mozilla::Mechanize::GUITester;

    # regular Mozilla::Mechanize initialization
    my $mech = Mozilla::Mechanize::GUITester->new(%mechanize_args);
    $mech->get_url($url);

    # convenience wrapper over GetElementById and QueryInterface
    my $elem = $mech->get_html_element_by_id("some_id");

    # click mouse at the element position + (1, 1)
    $mech->x_click($elem, 1, 1);

    # play with the mouse relative to the element position
    $mech->x_mouse_down($elem, 2, 2);
    $mech->x_mouse_move($elem, 4, 4);
    $mech->x_mouse_up($elem, 4, 4);

    # send keystrokes to the application
    $mech->x_send_keys('{DEL}');

    # press and release left CTRL button. You can click in the middle.
    $mech->x_press_key('LCT');
    $mech->x_release_key('LCT');

    # run some javascript code and print its result
    print $mech->run_js('return "js: " + 2');

    # find out element style using its id
    print $mech->get_element_style_by_id('the_elem_id', 'background-color');

    # are there any javascript errors?
    print Dumper($mech->console_messages);

    # find out HTTP response status (works only for HTTP protocol)
    print $mech->status;

    # change some text box by sending keypresses - fires all JS events
    my $input = $mech->get_html_element_by_id("tbox", "Input");
    $mech->x_change_text($input, "Hi");

    This module enhances Mozilla::Mechanize with convenience functions allowing testing of DHTML/JavaScript rich pages.

    It uses X11::GUITest to emulate mouse clicking, dragging and moving over elements in DOM tree.

    It also allows running of arbitrary javascript code in the page context and getting back the results.

    Requirements:

    · Perl



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    enhances Mozilla::Mechanize | GUI testing | Perl module | Mozilla::Mechanize:: | enhance | Mozilla::Mechanize

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM