Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove whitespace [Gun.io WhitespaceBot]
  • Loading branch information
Gun.io Whitespace Robot committed Oct 30, 2011
commit 3bf9272ab36b78dbd48e60dd2ee55ffd09159e76
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
*.pyc

# Logs and databases #
######################
*.log

# OS generated files #
######################
.DS_Store*
ehthumbs.db
Icon?
Thumbs.db
2 changes: 1 addition & 1 deletion BUILDING_FROM_SELENIUM.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version control. To create this file, follow these steps:
1) Find a iedoc.xml, and put it in the perl/ directory.
To download and extract iedoc.xml from the latest nightly selenium-core
build, run:

perl util/fetch_iedoc_xml.pl

2) Generate lib/WWW/Selenium.pm and t/selenium-core.t from iedoc.xml:
Expand Down
10 changes: 5 additions & 5 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Revision history for Perl extension Test::WWW::Selenium.
1.18 - Mon Aug 31 23:20:21 PDT 2009
- Update list of commands that do not require a locator (barbie++)
- Update Module::Install to 0.91
- Ensure that do_command reuses LWP objects and caches
- Ensure that do_command reuses LWP objects and caches
connections for performance (konobi++)
- Minor POD touchups by (dandv++)

Expand Down Expand Up @@ -99,7 +99,7 @@ Revision history for Perl extension Test::WWW::Selenium.

1.03 - Tue Jun 27 22:47:43 PDT 2006
- Unit tests don't test stderr using Test::Builder::Tester
- When the Test-Simple folks get T::B::Tester working better I'll
- When the Test-Simple folks get T::B::Tester working better I'll
re-enable these tests

1.02 - Sat Jun 24 17:25:35 PDT 2006
Expand All @@ -111,9 +111,9 @@ Revision history for Perl extension Test::WWW::Selenium.
- failed action_ok() doesn't die anymore, the test just fails

1.01 - Thu Jun 22 13:57:33 PDT 2006
- No longer call WWW::Selenium::AUTOLOAD if method can't be
- No longer call WWW::Selenium::AUTOLOAD if method can't be
found (rt bug #20042)
- Update sample Test::WWW::Selenium code to actually work
- Update sample Test::WWW::Selenium code to actually work
(Thanks, Shane Landrum)

1.00 - Mon Jun 12 08:53:18 PDT 2006
Expand Down Expand Up @@ -166,7 +166,7 @@ Revision history for Perl extension Test::WWW::Selenium.
- minor testing improvements

0.06 Thu Mar 9 00:01:34 PST 2006
- Added descriptive png images to doc/
- Added descriptive png images to doc/
- Added support for CGI driver to store/retrive commands and results
- Added script to convert a wiki syntax file into a perl script

Expand Down
8 changes: 4 additions & 4 deletions README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Test-WWW-Selenium is a perl driver and test library for Selenium Remote
Control (SRC). You will need to setup a Selenium Server that can launch
browsers.
Test-WWW-Selenium is a perl driver and test library for Selenium Remote
Control (SRC). You will need to setup a Selenium Server that can launch
browsers.

Selenium Remote Control (SRC) is a test tool that allows you to write
automated web application UI tests in any programming language against
Expand All @@ -21,7 +21,7 @@ Selenium Server. (The Selenium Server is a Java application.)
The Selenium Server is available here:

http://www.openqa.org/selenium-rc/

or on CPAN in the Alien-SeleniumRC package:

http://search.cpan.org/dist/Alien-SeleniumRC
Expand Down
14 changes: 7 additions & 7 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</perl>
<make />
</target>

<target name="pre-test">
<condition property="skiptests-headless">
<or>
Expand All @@ -74,7 +74,7 @@
</or>
</condition>
</target>

<target name="test-nonheadless" depends="init, make, pre-test" unless="skiptests-nonheadless">
<echo>${selenium-server}</echo>
<java jar="${selenium-server}" fork="true" spawn="true"/>
Expand All @@ -89,7 +89,7 @@
</condition>
<fail if="build.failed" message="perl tests failed!" />
</target>

<target name="test-headless" depends="init, make, pre-test" unless="skiptests-headless">
<echo>${selenium-server}</echo>
<java jar="${selenium-server}" fork="true" spawn="true"/>
Expand All @@ -108,9 +108,9 @@
</condition>
<fail if="build.failed" message="perl tests failed!" />
</target>

<target name="test" depends="test-headless, test-nonheadless" />

<target name="dist" depends="generate-sources, doc">
<mkdir dir="target" />
<property name="project.version" value="UNKNOWNVERSION" />
Expand All @@ -131,9 +131,9 @@
<zipfileset dir="doc" prefix="perl" />
</zip>
</target>

<target name="clean">
<delete file="lib/WWW/Selenium.pm" />
<delete file="lib/WWW/Selenium.pm" />
<mkdir dir="doc" />
<delete dir="doc" />
<mkdir dir="blib" />
Expand Down
6 changes: 3 additions & 3 deletions t/WWW/Selenium.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ my $ua_timeout = 180;
sub new {
my $class = shift;
my %opts = (
host => 'localhost',
port => 4444,
browser => '*firefox',
host => 'localhost',
port => 4444,
browser => '*firefox',
browser_url => 'http://example.com',
no_deprecation_msg => 1,
@_,
Expand Down
4 changes: 2 additions & 2 deletions t/selenium-compat.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use warnings;
use Test::More tests => 27;
use Test::Exception;

# The purpose of these tests are to ensure that WWW::Selenium does not
# The purpose of these tests are to ensure that WWW::Selenium does not
# break backwards compatibility with previously released versions.

BEGIN {
Expand Down Expand Up @@ -113,7 +113,7 @@ Get_selected_options: {

Two_selected: {
$sel->_set_mock_response_content('first response,second');
is_deeply [$sel->get_selected_options('id=foo')],
is_deeply [$sel->get_selected_options('id=foo')],
['first response', 'second'];
}
}
Expand Down
10 changes: 5 additions & 5 deletions t/selenium-rc.t
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ BEGIN {
}

Good_usage: {
my $sel = WWW::Selenium->new( host => 'localhost',
port => 4444,
browser => '*firefox',
my $sel = WWW::Selenium->new( host => 'localhost',
port => 4444,
browser => '*firefox',
browser_url => 'http://foo.com'
);
isa_ok $sel, 'WWW::Selenium';
Expand Down Expand Up @@ -75,7 +75,7 @@ Failing_command: {
throws_ok { $sel->get_title } qr#Error: foo#;
$Mock_resp->mock( content => sub { 'OK' } );
}

Multi_values: {
my $sel = WWW::Selenium->new( browser_url => 'http://foo.com' );
$Mock_resp->mock( content => sub { 'OK,SESSION_ID' } );
Expand All @@ -92,7 +92,7 @@ Multi_values: {
'c:\foo\bar',
'c:\I came, I \saw\, I conquered',
],
'one\\\\,two' => ['one\\,two'],
'one\\\\,two' => ['one\\,two'],
'one\\\\\\,two' => ['one\\', 'two'],
);
my $tester = sub {
Expand Down
8 changes: 4 additions & 4 deletions t/test-selenium.t
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Good_usage: {

Browser_gets_closed: {
$Mock_resp->mock('content' => sub { 'OK' });
$sel = undef;
$sel = undef;
req_ok('cmd=testComplete&sessionId=SESSION_ID');
}
}
Expand Down Expand Up @@ -124,7 +124,7 @@ Commands: {
$Mock_resp->mock('content' => sub { 'OK' });
}

no_locatior: {
no_locatior: {
$Mock_resp->mock('content' => sub { 'OK,SESSION_ID' });
for my $getter (qw(alert prompt location title)) {
$Mock_resp->mock('content' => sub { 'OK,SESSION_ID' });
Expand Down Expand Up @@ -194,7 +194,7 @@ Relative_location: {
Default_test_names: {
Default_names_off: {
$Mock_resp->mock('content' => sub { 'OK,SESSION_ID' });
my $sel = Test::WWW::Selenium->new(browser_url => 'http://foo.com',
my $sel = Test::WWW::Selenium->new(browser_url => 'http://foo.com',
default_names => 0);
$sel->open;
$Mock_resp->mock('content' => sub { 'OK' });
Expand All @@ -204,7 +204,7 @@ Default_test_names: {
}
Test_name_provided: {
$Mock_resp->mock('content' => sub { 'OK,SESSION_ID' });
my $sel = Test::WWW::Selenium->new(browser_url => 'http://foo.com',
my $sel = Test::WWW::Selenium->new(browser_url => 'http://foo.com',
default_names => 1);
$sel->open;
$Mock_resp->mock('content' => sub { 'OK' });
Expand Down
2 changes: 1 addition & 1 deletion todo.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

- fix google example to work in non-us countries

- Change documentation
- Change documentation
- to not use phrases like "We support"
- to not say "never throws an exception"

22 changes: 11 additions & 11 deletions util/WWW/Selenium/XMLParseUtils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ sub strip_blockquotes {
. "\n\n=back\n\n";

# hack for Element Filters section - it's inconsistent with the
# other sections, and shouldn't be in a blockquote
# other sections, and shouldn't be in a blockquote
# Remove this once fixed
if ($lines[0] =~ m/^Element filters can be used/) {
$new_text = "\n" . join("\n", @lines) . "\n";
Expand All @@ -40,7 +40,7 @@ sub html2pod {
my $orig_text = $text;
$text =~ s#<p>(.+?)</p>#\n$1\n#smg; # p's should be spaced out a bit
$text =~ s#^</?(?:p|dl)>##smg; # <p>s and <dl>s on their own line
$text =~ s#</?(?:p|dl)>##g; # <p>s and <dl>s
$text =~ s#</?(?:p|dl)>##g; # <p>s and <dl>s
$text =~ s#<a name="[^"]+">([^<]*)</a>#$1#g; # don't need anchors
$text =~ s#<h3>([^<]+)</h3>#\n\n=head3 $1\n\n#g; # headings
$text =~ s#<em>([^<]+)</em>#I<$1>#g; # italics
Expand Down Expand Up @@ -92,8 +92,8 @@ sub extract_functions {

$text = html2pod($text);
$text =~ s#\n{2,}#\n\n#g;
push @functions, {
name => $perl_name,
push @functions, {
name => $perl_name,
text => $text,
return_type => $return_type,
params => $params,
Expand Down Expand Up @@ -139,14 +139,14 @@ sub _extract_params {
$name = camel2perl($name);
push @params, { name => $name, desc => $desc };
}
my $names = join ', ',
map { "\$$_->{name}" }
my $names = join ', ',
map { "\$$_->{name}" }
@params;
my $desc = '';
if (@params) {
$desc = "=over\n\n"
. join("\n\n",
map { "\$$_->{name} is $_->{desc}" }
. join("\n\n",
map { "\$$_->{name} is $_->{desc}" }
@params)
. "\n\n=back\n";
}
Expand All @@ -162,9 +162,9 @@ sub _extract_return_type {
return ('', '');
}

sub camel2perl {
my $n = shift;
$n =~ s/([a-z]+)([A-Z]+)/"$1_" . lc($2)/eg;
sub camel2perl {
my $n = shift;
$n =~ s/([a-z]+)([A-Z]+)/"$1_" . lc($2)/eg;
return $n;
}

Expand Down
Loading