File: test_function.pl

package info (click to toggle)
libtest-www-selenium-perl 1.36-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 460 kB
  • sloc: perl: 2,382; xml: 1,459; makefile: 8
file content (20 lines) | stat: -rw-r--r-- 567 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/perl
use strict;
use warnings;
use lib 'lib';
use WWW::Selenium;

my ($function, @args) = @ARGV;
die 'no function' unless $function;

my $sel = WWW::Selenium->new(browser_url => 'http://www.csc.uvic.ca', browser => '*chrome', verbose => 1);
$sel->start;
$sel->open('http://www.csc.uvic.ca/~labspg/Reference/javascript/script4.9.html');
my $content = $sel->get_body_text;

$sel->select('name=order', 'a box of cereal');
$sel->add_selection('name=order', '100 lbs. blueberries');
print "$function=(", join(',', $sel->$function(@args)), ")\n";


$sel->close;