+ ok(defined $lxtest->{dbhost}, "found dbhost in config");
+ ok(defined $lxtest->{dbport}, "found dbport in config");
+ ok(defined $lxtest->{dbuser}, "found dbuser in config");
+ ok(defined $lxtest->{dbpasswd}, "found dbpasswd in config");
+
+ $lxtest->{lxadmin_url} = $lxtest->{lxbaseurl} . "admin.pl";
+ $lxtest->{lxadmin_with_get} = $lxtest->{lxadmin_url} . "?rpw=$lxtest->{rpw}&nextsub=list_users&action=Weiter";
+ $lxtest->{lxadmin} = $lxtest->{lxadmin_url} . "?rpw=$lxtest->{rpw}&nextsub=list_users&action=Weiter";
+
+
+
+
+ eval { $sel = Test::WWW::Selenium->new(
+ host => $lxtest->{seleniumhost},
+ port => $lxtest->{seleniumport},
+ browser => $lxtest->{seleniumbrowser},
+ browser_url => $lxtest->{lxadmin},
+ auto_stop => '0',
+ );
+ };
+ if ($@) {
+ diag("No Selenium Server running, or wrong preferences\n\n");
+ exit 0;
+ }
+
+ ok(defined $sel, 'Creating Selenium Object');
+
+ diag('Starting Selenium tests...');
+
+ foreach my $scriptdir (@_) {
+ opendir(SCRIPTS, 't/selenium/testscripts/' . $scriptdir);
+ foreach (sort readdir(SCRIPTS)) {
+ require_ok("t/selenium/testscripts/". $scriptdir . "/" . $_) if ( $_ =~ /^\w\d\d\d.*\.t$/);
+ }
+ closedir(SCRIPTS);
+ }
+ $sel->stop();