Remove obsolete tests.
Fix app server starting.
Fix catapp.t to use the new system.
Fix the remaining test corpus files to use relative URLs where appropriate.
last;
}
}
- die "timed out waiting for selenium server to start" if $tries == 5;
+ die "timed out waiting for selenium server to start at
+ http://$self->{selenium_rc}{host}:$self->{selenium_rc}{port}" if $tries == 5;
}
sub stop_selenium_server {
sub test_directory {
my ($self, $dir) = @_;
+ if(!exists $self->{app_server_proc}) {
+ $self->start_app_server;
+ }
if($self->{selenium_rc}{start} && !$self->{selenium_rc}{selenium_server_proc}) {
$self->start_selenium_server;
}
use Test::More;
my $browser = shift;
-my $s = Test::Harness::Selenium->new({
- host => 'localhost',
- port => $< + 60_000,
- browser_url => 'http://127.0.0.1:3000',
- browser => $browser,
-});
-$s->start_server;
-$s->run_tests_for('t/corpus/thselenium.html');
-$s->stop_server;
+my $s = Test::Harness::Selenium->new(
+ selenium_rc => {
+ host => '10.0.0.8',
+ port => $< + 6900,
+ start => 1,
+ xvnc_display => 1,
+ },
+ app_base => 'http://10.0.0.5:3000',
+ app_server_cmd => 'examples/THSelenium-Test/script/thselenium_test_server.pl',
+ browser => '*firefox',
+);
+$s->test_directory('t/corpus/');
done_testing;
+++ /dev/null
-<html>
-<body>
-<table border="1" class="docutils" id="google-search-example">
-<colgroup>
-<col width="32%" />
-<col width="47%" />
-<col width="21%" />
-</colgroup>
-<tbody valign="top">
-<tr><td>open</td>
-<td>/</td>
-
-<td> </td>
-</tr>
-<tr><td>type</td>
-<td>q</td>
-<td>selenium rc</td>
-</tr>
-<tr><td>clickAndWait</td>
-<td>btnG</td>
-<td> </td>
-</tr>
-<tr><td>textLike</td>
-
-<td>Searches related to selenium rc</td>
-<td> </td>
-</tr>
-</tbody>
-</table>
-</body>
-</html>
+++ /dev/null
-<html>
-<body>
-<table border="1" class="docutils" id="google-search-example">
-<colgroup>
-<col width="32%" />
-<col width="47%" />
-<col width="21%" />
-</colgroup>
-<tbody valign="top">
-<tr><td>open</td>
-<td>/</td>
-
-<td> </td>
-</tr>
-<tr><td>type</td>
-<td>q</td>
-<td>selenium rc</td>
-</tr>
-<tr><td>textLike</td>
-
-<td>Searches related to rc</td>
-<td> </td>
-</tr>
-</tbody>
-</table>
-</body>
-</html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<link rel="selenium.base" href="http://127.0.0.1:3000/" />
<title>thselenium</title>
</head>
<body>
</tr>
<tr>
<td>clickAndWait</td>
- <td>//a[@href='http://127.0.0.1:3000/echo']</td>
+ <td>//a[@href='/echo']</td>
<td></td>
</tr>
<tr>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head profile="http://selenium-ide.openqa.org/profiles/test-case">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<link rel="selenium.base" href="http://127.0.0.1:3000/" />
<title>thseleniumpass</title>
</head>
<body>