"printing" => 't/selenium/TestPrinting.t',
"programm" => 't/selenium/TestProgramm.t',
"reports" => 't/selenium/TestReports.t' );
- my $testonly = 0;
+ my $showtests = 0;
+ my $singletest = 0;
my $nodb = 0;
my @totest;
print "\t\t -admin\tonly runs testscripts for \"administration\"\n";
print "\t\t -testbed\tcreates a standardized test database\n";
print "\t\t -nodb\t\tdoesn't create a db! Only use with \n\t\t\t\t--username, --userpasswd, --dbname, --dbport, --dbhost, --dbuser, --dbpasswd, --rootpasswd arguments!\n";
- print "\t\t -testsonly\tfinally shows all tests available only\n";
+ print "\t\t -showtests\tfinally shows all tests available only\n";
+ print "\t\t -singletest\toption flag for using single tests shown in \"-showtests\"\n";
printf "\n\t\targuments:\n\t\t%s\n","\xAF" x 10;
+ print "\t\t --test=\tname of Test shown in showtests seperated by , (Only joined by -singletest)\n";
print "\t\t --username=\tuser login name\n";
print "\t\t --userpasswd=\tuser login password\n";
print "\t\t --dbname=\tname of used db (leave empty whether dbname is seleniumtestdatabase)\n";
$_ = $ARGV[0];
if ( /^--help$/ ) { usage; last }
- if ( /^-testonly$/) { $testonly = 1; shift; next }
- if ( /^-nodb$/ ) { $nodb = 1; shift; next }
- if ( /^-(masterdata)$/ ) { push @totest, $1; shift; next }
- if ( /^-(system)$/ ) { push @totest, $1; shift; next }
- if ( /^-(selling)$/ ) { push @totest, $1; shift; next }
- if ( /^-(purchase)$/ ) { push @totest, $1; shift; next }
- if ( /^-(testbed)$/ ) { push @totest, $1; shift; next }
- if ( /^-(admin)$/ ) { push @totest, $1; shift; next }
- if ( /^--username=(.*)$/ ) { $lxtest{testuserlogin} = $1; shift; next }
- if ( /^--userpasswd=(.*)$/ ) { $lxtest{testuserpasswd} = $1; shift; next }
- if ( /^--dbname=(.*)$/ ) { $lxtest{db} = $1; shift; next }
- if ( /^--dbport=(.*)$/ ) { $lxtest{dbport} = $1; shift; next }
- if ( /^--dbhost=(.*)$/ ) { $lxtest{dbhost} = $1; shift; next }
- if ( /^--dbuser=(.*)$/ ) { $lxtest{dbuser} = $1; shift; next }
- if ( /^--dbpasswd=(.*)$/ ) { $lxtest{dbpasswd} = $1; shift; next }
- if ( /^--rootpasswd=(.*)$/ ) { $lxtest{rpw} = $1; shift; next }
- if ( /^([A-Z].*)$/ ) { push @totest, shift; next }
- if ( /^-/ ) {
+ elsif ( /^-showtests$/) { $showtests = 1; shift; next }
+ elsif ( /^-nodb$/ ) { $nodb = 1; shift; next }
+ elsif ( /^-(masterdata)$/ ) { push @totest, $1; shift; next }
+ elsif ( /^-(system)$/ ) { push @totest, $1; shift; next }
+ elsif ( /^-(selling)$/ ) { push @totest, $1; shift; next }
+ elsif ( /^-(purchase)$/ ) { push @totest, $1; shift; next }
+ elsif ( /^-(testbed)$/ ) { push @totest, $1; shift; next }
+ elsif ( /^-(payments)$/ ) { push @totest, $1; shift; next }
+ elsif ( /^-(admin)$/ ) { push @totest, $1; shift; next }
+ elsif ( /^-(printing)$/ ) { push @totest, $1; shift; next }
+ elsif ( /^-(reports)$/ ) { push @totest, $1; shift; next }
+ elsif ( /^-(accounting)$/ ) { push @totest, $1; shift; next }
+ elsif ( /^-(purchase)$/ ) { push @totest, $1; shift; next }
+ elsif ( /^-(programm)$/ ) { push @totest, $1; shift; next }
+ elsif ( /^-singletest$/ ) { $singletest = 1; shift; next }
+ elsif ( /^--username=(.*)$/ ) { $lxtest{testuserlogin} = $1; shift; next }
+ elsif ( /^--userpasswd=(.*)$/ ) { $lxtest{testuserpasswd} = $1; shift; next }
+ elsif ( /^--dbname=(.*)$/ ) { $lxtest{db} = $1; shift; next }
+ elsif ( /^--dbport=(.*)$/ ) { $lxtest{dbport} = $1; shift; next }
+ elsif ( /^--dbhost=(.*)$/ ) { $lxtest{dbhost} = $1; shift; next }
+ elsif ( /^--dbuser=(.*)$/ ) { $lxtest{dbuser} = $1; shift; next }
+ elsif ( /^--dbpasswd=(.*)$/ ) { $lxtest{dbpasswd} = $1; shift; next }
+ elsif ( /^--rootpasswd=(.*)$/ ) { $lxtest{rpw} = $1; shift; next }
+ elsif ( /^--test=(.*)$/ ) { foreach (split(/\,/, $1)) { push @totest, $_; } shift; next }
+ elsif ( /^([A-Z].*)$/ ) { push @totest, shift; next }
+ else {
print STDERR "$0: ERROR: unrecognized option '$_' ?\n";
usage;
}
last;
}
-
+ unlink("/tmp/lxtest-temp.conf") if (-f "/tmp/lxtest-temp.conf");
open TEMPCONF, "+>/tmp/lxtest-temp.conf";
print TEMPCONF '$lxtest = {'."\n";
foreach (keys(%lxtest)) {
}
print TEMPCONF '};';
close TEMPCONF;
-
- my $testscriptdir = 't/selenium/testscripts/';
- opendir(ROOT, $testscriptdir);
- foreach my $dir ( readdir( ROOT ) ) {
- if(-d $testscriptdir . $dir && $dir ne "begin" && $dir ne "end" && $dir ne "..") {
- opendir(DIR, $testscriptdir . $dir . "/begin");
- foreach ( readdir(DIR) ) {
- $tests{ substr ( substr( $_, 4 ), 0, -2 ) } = $testscriptdir . ($dir eq "." ? "" : $dir . "/") . "begin/" . $_ if ( $_ =~ /^\w\d\d\d.*\.t$/ );
- }
- closedir(DIR);
- opendir(DIR, $testscriptdir . $dir . "/end");
- foreach (readdir(DIR)) {
- $tests{ substr ( substr( $_, 4 ), 0, -2 ) } = $testscriptdir . ($dir eq "." ? "" : $dir . "/") . "end/" . $_ if ( $_ =~ /^\w\d\d\d.*\.t$/ );
+
+ if($singletest || $showtests) {
+ my $testscriptdir = 't/selenium/testscripts/';
+ opendir(ROOT, $testscriptdir);
+ foreach my $dir ( readdir( ROOT ) ) {
+ if(-d $testscriptdir . $dir && $dir ne "begin" && $dir ne "end" && $dir ne "..") {
+ opendir(DIR, $testscriptdir . $dir . "/begin");
+ foreach ( readdir(DIR) ) {
+ $tests{ substr ( substr( $_, 4 ), 0, -2 ) } = $testscriptdir . ($dir eq "." ? "" : $dir . "/") . "begin/" . $_ if ( $_ =~ /^\w\d\d\d.*\.t$/ );
+ }
+ closedir(DIR);
+ opendir(DIR, $testscriptdir . $dir . "/end");
+ foreach (readdir(DIR)) {
+ $tests{ substr ( substr( $_, 4 ), 0, -2 ) } = $testscriptdir . ($dir eq "." ? "" : $dir . "/") . "end/" . $_ if ( $_ =~ /^\w\d\d\d.*\.t$/ );
+ }
+ closedir(DIR);
}
- closedir(DIR);
}
+ closedir(ROOT);
}
- closedir(ROOT);
-
push @totest, "all" if(!$totest[0]);
## Frontendtests:
-
- foreach (@totest) {
- &runtests(
- $tests{$_},
- ) if (!$testonly);
+ if (!$showtests) {
+ foreach (@totest) {
+ &runtests(
+ $tests{$_},
+ );
+ }
}
- if($testonly) {
+ elsif($showtests) {
printf "\tFollowing testscripts are present:\n\t%s\n","\xAF" x 34;;
foreach (sort(keys(%tests))) {
print "\t\t" . $_ ."\n" if( /^[A-Z].*$/ );
# plan tests => 200; # Need to be cutomized
# }
sub init_server {
+ my $singlefileonly = 0;
+ if ($_[0] eq "singlefileonly") {
+ $singlefileonly = 1;
+ shift;
+ }
if(!server_is_running) {
print "No selenium server found! "
."Maybe you forgot to start it or "
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$/);
+ if(!$singlefileonly) {
+ 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);
}
- closedir(SCRIPTS);
+ }
+ else {
+ foreach (@_) { require_ok($_); }
}
if($!) {
@! = ("Test fehlgeschlagen!");
### Create Database
-
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly", $0);
+ exit(0);
+}
$sel->open_ok($lxtest->{lxadmin});
if($sel->get_title() eq "") {
$sel->title_is("Lx-Office ERP Administration -");
diag('Lock the system');
-$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]");
+$sel->click_ok("document.forms[0].action[3]"); # Button für System sperren
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
$sel->title_is("Lx-Office ERP Administration -");
$sel->title_is("Lx-Office ERP Administration -");
diag('Unlock the system');
-$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]");
+$sel->click_ok("document.forms[0].action[3]"); # BUtton für System entsperren
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
$sel->title_is("Lx-Office ERP Administration -");
+1;
\ No newline at end of file
-
### Create new user
+
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly", $0);
+ exit(0);
+}
+
diag("Create test user '$lxtest->{testuserlogin}'");
$sel->open_ok($lxtest->{lxadmin});
$sel->click_ok("action");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
$sel->title_is("Lx-Office ERP Administration -");
+1;
\ No newline at end of file
### Update Database
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly", $0);
+ exit(0);
+}
# NOTEST: some preruns for initializing missing parameters
$sel->open($lxtest->{lxadmin});
### Delete user
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+
diag("Delete test user '$lxtest->{testuserlogin}'");
$sel->open_ok($lxtest->{lxadmin});
$sel->title_is("Lx-Office ERP Administration / Benutzerdaten bearbeiten -");
$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Löschen\")]");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
$sel->open_ok($lxtest->{lxadmin});
diag('Unlock the system');
$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->title_is("Lx-Office ERP Administration -");
\ No newline at end of file
+$sel->title_is("Lx-Office ERP Administration -");
+1;
\ No newline at end of file
### Login
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+
diag("Login");
$sel->open_ok($lxtest->{lxbaseurl}."/login.pl");
$sel->click_ok("//input[(\@type=\"submit\") and (\@value=\"Weiter\")]");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
}
+
+$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
-
-$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
\ No newline at end of file
+1;
\ No newline at end of file
### Logout
-diag("Logout");
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly", "t/selenium/testscripts/base/000Login.t", $0);
+ exit(0);
+}
+diag("Logout");
$sel->select_frame_ok("relative=top");
$sel->click_ok("link=abmelden");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->title_is("Lx-Office Version ".$lxtest->{version});
\ No newline at end of file
+$sel->title_is("Lx-Office Version ".$lxtest->{version});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Create first Customer");
if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
$sel->type_ok("zipcode", "37115");
$sel->type_ok("city", "Musterstadt");
$sel->type_ok("country", "Germany");
-$sel->type_ok("creditlimit", "100");
+$sel->type_ok("creditlimit", "10000000");
$sel->type_ok("discount", "5");
$sel->type_ok("account_number", "1");
$sel->select_ok("salesman_id", "label=Selenium");
$sel->select_frame_ok("main_window");
$sel->click_ok("link=Rechnungsadresse");
$sel->click_ok("customernumber");
+$sel->type_ok("creditlimit", "10000000");
$sel->type_ok("customernumber", "2");
$sel->click_ok("greeting");
$sel->type_ok("greeting", "Herr");
$sel->select_frame_ok("main_window");
$sel->click_ok("customernumber");
$sel->type_ok("customernumber", "3");
+$sel->type_ok("creditlimit", "10000000");
$sel->click_ok("greeting");
$sel->type_ok("greeting", "Frau");
$sel->type_ok("name", "TestFrau3");
$sel->type_ok("country", "Austria");
$sel->click_ok("document.ct.action[1]");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Create vendor");
if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
$sel->click_ok("link=Lieferungen");
$sel->click_ok("document.ct.action[1]");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Create goods");
if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
$sel->click_ok("document.ic.action[1]");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Add service");
if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
$sel->type_ok("price_2", "0,1");
$sel->type_ok("price_1", "0,1");
$sel->click_ok("document.ic.action[1]");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
\ No newline at end of file
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Add product");
if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
$sel->click_ok("action");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
$sel->click_ok("document.ic.action[1]");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
\ No newline at end of file
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
-diag("Add product");
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+
+diag("Add project");
if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
require_ok("../../begin/B004Login.t");
$sel->type_ok("projectnumber", "1001");
$sel->type_ok("description", "tausend und eine Nacht");
$sel->click_ok("action");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
\ No newline at end of file
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
--- /dev/null
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+diag("Delete good");
+
+if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
+ require_ok("M000Login.t");
+}
+
+$sel->select_frame_ok("relative=up");
+$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
+$sel->click_ok("link=Erzeugnisse");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_frame_ok("main_window");
+
+# an dieser Stelle muss noch überleegt werdne, wie der Zusaamenhang zwischen Lagerbestand und "Löschen" vernünftigt gehandhabt werdne kann
+
+1;
\ No newline at end of file
--- /dev/null
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+diag("Delete project");
+
+if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
+ require_ok("M000Login.t");
+}
+
+$sel->select_frame_ok("relative=up");
+$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
+$sel->click_ok("link=Projekte");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_frame_ok("main_window");
+$sel->click_ok("action");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->text_is("link=1001", "1001");
+$sel->click_ok("link=1001");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+TODO: {
+ local $TODO= "Benutzte Projekte können nicht gelöscht werden!";
+ $sel->click_ok("document.forms[0].action[1]");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+}
+
+1;
\ No newline at end of file
--- /dev/null
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+diag("Delete service");
+
+if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
+ require_ok("M000Login.t");
+}
+
+$sel->select_frame_ok("relative=up");
+$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
+$sel->click_ok("link=Dienstleistungen");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_frame_ok("main_window");
+$sel->click_ok("action");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->text_is("link=999", "999");
+$sel->text_is("link=998", "998");
+$sel->text_is("link=Programmierstunde", "Programmierstunde");
+$sel->text_is("link=Telefonstunde", "Telefonstunde");
+$sel->click_ok("link=999");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("document.ic.action[3]");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("link=Telefonstunde");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("document.ic.action[3]");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
--- /dev/null
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+diag("Delete product");
+
+if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
+ require_ok("M000Login.t");
+}
+
+$sel->select_frame_ok("relative=up");
+$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
+$sel->click_ok("link=Waren");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_frame_ok("main_window");
+$sel->click_ok("action");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->text_is("link=TestWare1", "TestWare1");
+$sel->text_is("link=TestWareSelenium2", "TestWareSelenium2");
+$sel->text_is("link=1", "1");
+$sel->text_is("link=2", "2");
+TODO: {
+ local $TODO = "Waren in Rechnungen können nicht gelöscht werden!";
+ $sel->click_ok("link=1");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("document.ic.action[3]");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("link=TestWareSelenium2");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("document.ic.action[3]");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+}
+1;
\ No newline at end of file
--- /dev/null
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+diag("Create quote request");
+
+$sel->select_frame_ok("relative=up");
+$sel->click_ok("link=Neue Preisanfrage");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_frame_ok("main_window");
+$sel->click_ok("partnumber_1");
+$sel->type_ok("partnumber_1", "1");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("action");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("quonumber");
+$sel->type_ok("quonumber", "1");
+$sel->click_ok("cp_id");
+$sel->select_ok("cp_id", "label=Baumann von Clausen (Vertrieb)");
+$sel->click_ok("//option[\@value='905']");
+$sel->click_ok("shipto_id");
+$sel->click_ok("shipto_id");
+$sel->click_ok("taxzone_id");
+$sel->click_ok("taxzone_id");
+$sel->click_ok("cb_show_details");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("payment_id");
+$sel->select_ok("payment_id", "label=Schnellzahler/Skonto");
+$sel->click_ok("//option[\@value='886']");
+$sel->click_ok("//tr[5]/td/table/tbody/tr/td[3]");
+$sel->click_ok("taxincluded");
+$sel->click_ok("qty_1");
+$sel->type_ok("qty_1", "21");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("document.oe.action[6]");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
--- /dev/null
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+diag("Create offers");
+
+$sel->select_frame_ok("relative=up");
+$sel->click_ok("link=Angebot erfassen");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_frame_ok("main_window");
+$sel->select_ok("cp_id", "label=Grosshaupt (Verkauf)");
+$sel->select_ok("customer", "label=TestFrau3");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_ok("customer", "label=Selenium-Testfirma1");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_ok("cp_id", "label=Grosshaupt (Verkauf)");
+$sel->type_ok("shipvia", "per pedes");
+$sel->type_ok("transaction_description", "alpha");
+$sel->type_ok("quonumber", "1");
+$sel->select_ok("globalproject_id", "label=1001");
+$sel->click_ok("cb_show_details");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->type_ok("partnumber_1", "1");
+TODO: {
+ local $TODO = "Popups werden von Selenium noch nicht unterstützt!";
+ $sel->click_ok("//button[\@type='button']");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+}
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("action");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("document.oe.action[5]");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("document.oe.action[6]");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_ok("customer", "label=TestFrau3");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->type_ok("partnumber_1", "991");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->type_ok("qty_1", "5");
+$sel->select_ok("sellprice_pg_1", "label=SeleniumTestPreisgruppe1");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("taxincluded");
+$sel->select_ok("payment_id", "label=Schnellzahler/Skonto");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("document.oe.action[6]");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_ok("customer", "label=TestMann2");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->type_ok("partnumber_1", "1");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("action");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_ok("sellprice_pg_1", "label=SeleniumTestPreisgruppe1");
+$sel->type_ok("qty_1", "19");
+$sel->select_ok("payment_id", "label=Schnellzahler/Skonto");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("document.oe.action[6]");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
--- /dev/null
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+diag("Create charge");
+
+$sel->select_frame_ok("relative=up");
+$sel->click_ok("link=Auftrag erfassen");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_frame_ok("main_window");
+$sel->select_ok("cp_id", "label=Grosshaupt (Verkauf)");
+$sel->type_ok("shippingpoint", "Braunschweig");
+$sel->type_ok("shipvia", "LKW");
+$sel->type_ok("transaction_description", "beta");
+$sel->click_ok("delivered");
+$sel->type_ok("ordnumber", "1");
+$sel->type_ok("quonumber", "1");
+$sel->type_ok("cusordnumber", "97862");
+$sel->select_ok("globalproject_id", "label=1001");
+$sel->type_ok("partnumber_1", "1");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("action");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->type_ok("ship_1", "20");
+$sel->type_ok("qty_1", "20");
+$sel->select_ok("sellprice_pg_1", "label=SeleniumTestPreisgruppe1");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_ok("payment_id", "label=Schnellzahler/Skonto");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("document.oe.action[6]");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_ok("customer", "label=TestFrau3");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->type_ok("shippingpoint", "Göttingen");
+$sel->type_ok("shipvia", "PKW");
+$sel->type_ok("transaction_description", "teta");
+$sel->type_ok("ordnumber", "2");
+$sel->type_ok("quonumber", "2");
+$sel->type_ok("cusordnumber", "23453666");
+$sel->type_ok("partnumber_1", "911");
+$sel->type_ok("ship_1", "5");
+$sel->type_ok("qty_1", "5");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("action");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->type_ok("description", "Handykarten D2");
+$sel->select_ok("partsgroup", "label=TestSeleniumWarengruppe3");
+$sel->type_ok("listprice", "10,00");
+$sel->type_ok("sellprice", "20,00");
+$sel->type_ok("lastcost", "5,00");
+$sel->select_ok("price_factor_id", "label=pro 10");
+$sel->select_ok("unit", "label=Stck");
+$sel->type_ok("bin", "911");
+$sel->click_ok("not_discountable");
+$sel->click_ok("shop");
+$sel->click_ok("action");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("document.ic.action[1]");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("document.oe.action[6]");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_ok("customer", "label=TestMann2");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->type_ok("partnumber_1", "991");
+$sel->type_ok("ship_1", "10");
+$sel->type_ok("qty_1", "10");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_ok("price_factor_id_1", "label=pro 10");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->type_ok("sellprice_1", "1000");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("document.oe.action[6]");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
\ No newline at end of file
--- /dev/null
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+diag("Create invoice");
+
+$sel->select_frame_ok("relative=up");
+$sel->click_ok("link=Rechnung erfassen");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->select_frame_ok("main_window");
+$sel->select_ok("customer", "label=TestFrau3");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->type_ok("partnumber_1", "1");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("action");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->type_ok("partnumber_2", "991");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->type_ok("invnumber", "1");
+$sel->click_ok("trigger3");
+$sel->click_ok("trigger_orddate");
+$sel->type_ok("quonumber", "2");
+$sel->click_ok("trigger_quodate");
+$sel->select_ok("payment_id", "label=Schnellzahler/Skonto");
+$sel->click_ok("update_button");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+$sel->click_ok("document.invoice.action[6]");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Create product groups");
$sel->select_frame_ok("relative=up");
$sel->click_ok("action");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
$sel->click_ok("link=TestSeleniumWarengruppe3");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
\ No newline at end of file
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Create price brackets");
$sel->select_frame_ok("relative=up");
$sel->type_ok("pricegroup", "SeleniumTestPreisgruppe2");
$sel->click_ok("action","value=Speichern");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Add languages");
$sel->select_frame_ok("relative=up");
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Show languages");
$sel->select_frame_ok("relative=up");
$sel->wait_for_page_to_load($lxtest->{timeout});
$sel->click_ok("action");
$sel->wait_for_page_to_load($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Add payment conditions");
$sel->select_frame_ok("relative=up");
$sel->type_ok("terms_skonto", "97");
$sel->click_ok("action");
$sel->wait_for_page_to_load($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Show payment conditions");
$sel->select_frame_ok("relative=up");
$sel->click_ok("link=Schnellzahler/Skonto");
$sel->wait_for_page_to_load($lxtest->{timeout});
$sel->click_ok("action");
-$sel->wait_for_page_to_load($lxtest->{timeout});
\ No newline at end of file
+$sel->wait_for_page_to_load($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Add customer/vendor types");
$sel->select_frame_ok("relative=up");
$sel->type_ok("customernumberinit", "200");
$sel->click_ok("action");
$sel->wait_for_page_to_load($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Show customer/vendor types");
$sel->select_frame_ok("relative=up");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
$sel->click_ok("action");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Add show and delete measure");
$sel->select_frame_ok("relative=up");
$sel->click_ok("delete_8");
$sel->click_ok("document.forms[0].action[1]");
$sel->wait_for_page_to_load($lxtest->{timeout});
-
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Add show and delete service measure");
$sel->select_frame_ok("relative=up");
$sel->click_ok("delete_5");
$sel->click_ok("document.forms[0].action[1]");
$sel->wait_for_page_to_load($lxtest->{timeout});
+1;
\ No newline at end of file
--- /dev/null
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+diag("Create Account");
+
+$sel->select_frame_ok("relative=up");
+$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
+$sel->click_ok("link=Konto erfassen");
+$sel->wait_for_page_to_load($lxtest->{timeout});
+$sel->select_frame_ok("main_window");
+$sel->type_ok("accno", "000000000001");
+$sel->type_ok("description", "TestSeleniumKonto");
+$sel->select_ok("AccountType", "label=Aktiva/Mittelverwendung (A)");
+$sel->click_ok("AR");
+$sel->click_ok("AP");
+$sel->click_ok("IC");
+$sel->click_ok("AR_amount");
+$sel->click_ok("AR_paid");
+$sel->click_ok("AR_tax");
+$sel->click_ok("AP_amount");
+$sel->click_ok("AP_paid");
+$sel->click_ok("AP_tax");
+$sel->click_ok("IC_sale");
+$sel->click_ok("IC_cogs");
+$sel->click_ok("IC_taxpart");
+$sel->click_ok("IC_income");
+$sel->click_ok("IC_expense");
+$sel->click_ok("IC_taxservice");
+$sel->select_ok("pos_eur", "label=05. Ausserordentliche Erträge");
+$sel->select_ok("pos_bwa", "label=05. So.betr.Erlöse");
+$sel->select_ok("pos_bilanz", "label=02.");
+$sel->click_ok("datevautomatik");
+$sel->click_ok("action");
+$sel->wait_for_page_to_load_ok("30000");
+$sel->is_element_present_ok("link=000000000001");
+$sel->is_text_present_ok("TestSeleniumKonto");
+1;
\ No newline at end of file
--- /dev/null
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+diag("Show Accounts");
+
+$sel->select_frame_ok("relative=up");
+$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
+$sel->click_ok("link=Konten anzeigen");
+$sel->wait_for_page_to_load($lxtest->{timeout});
+$sel->select_frame_ok("main_window");
+$sel->title_is("Kontenübersicht - Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
+$sel->is_element_present_ok("link=000000000001");
+$sel->is_element_present_ok("link=0027");
+$sel->is_element_present_ok("link=0090");
+$sel->is_element_present_ok("link=0200");
+$sel->is_element_present_ok("link=0210");
+$sel->is_element_present_ok("link=0380");
+$sel->is_element_present_ok("link=0400");
+$sel->is_element_present_ok("link=0410");
+$sel->is_element_present_ok("link=0420");
+$sel->is_element_present_ok("link=0430");
+$sel->is_element_present_ok("link=0440");
+$sel->is_element_present_ok("link=0480");
+$sel->is_element_present_ok("link=0631");
+$sel->is_element_present_ok("link=0640");
+$sel->is_element_present_ok("link=0650");
+$sel->is_element_present_ok("link=0853");
+$sel->is_element_present_ok("link=1000");
+$sel->is_element_present_ok("link=1200");
+$sel->is_element_present_ok("link=1360");
+$sel->is_element_present_ok("link=1400");
+$sel->is_element_present_ok("link=1445");
+$sel->is_element_present_ok("link=1446");
+$sel->is_element_present_ok("link=1447");
+$sel->is_element_present_ok("link=1448");
+$sel->is_element_present_ok("link=1449");
+$sel->is_element_present_ok("link=1450");
+$sel->is_element_present_ok("link=1570");
+$sel->is_element_present_ok("link=1571");
+$sel->is_element_present_ok("link=1572");
+$sel->is_element_present_ok("link=1573");
+$sel->is_element_present_ok("link=1574");
+$sel->is_element_present_ok("link=1575");
+$sel->is_element_present_ok("link=1576");
+$sel->is_element_present_ok("link=1577");
+$sel->is_element_present_ok("link=1578");
+$sel->is_element_present_ok("link=1580");
+$sel->is_element_present_ok("link=1581");
+$sel->is_element_present_ok("link=1582");
+$sel->is_element_present_ok("link=1584");
+$sel->is_element_present_ok("link=1588");
+$sel->is_element_present_ok("link=1590");
+$sel->is_element_present_ok("link=1592");
+$sel->is_element_present_ok("link=1600");
+$sel->is_element_present_ok("link=1605");
+$sel->is_element_present_ok("link=1606");
+$sel->is_element_present_ok("link=1607");
+$sel->is_element_present_ok("link=1609");
+$sel->is_element_present_ok("link=1767");
+$sel->is_element_present_ok("link=1771");
+$sel->is_element_present_ok("link=1772");
+$sel->is_element_present_ok("link=1773");
+$sel->is_element_present_ok("link=1774");
+$sel->is_element_present_ok("link=1775");
+$sel->is_element_present_ok("link=1776");
+$sel->is_element_present_ok("link=1780");
+$sel->is_element_present_ok("link=1785");
+$sel->is_element_present_ok("link=1790");
+$sel->is_element_present_ok("link=1791");
+$sel->is_element_present_ok("link=1800");
+$sel->is_element_present_ok("link=1810");
+$sel->is_element_present_ok("link=1820");
+$sel->is_element_present_ok("link=1830");
+$sel->is_element_present_ok("link=1840");
+$sel->is_element_present_ok("link=1890");
+$sel->is_element_present_ok("link=2000");
+$sel->is_element_present_ok("link=2010");
+$sel->is_element_present_ok("link=2020");
+$sel->is_element_present_ok("link=2100");
+$sel->is_element_present_ok("link=2107");
+$sel->is_element_present_ok("link=2110");
+$sel->is_element_present_ok("link=2120");
+$sel->is_element_present_ok("link=2125");
+$sel->is_element_present_ok("link=2130");
+$sel->is_element_present_ok("link=2140");
+$sel->is_element_present_ok("link=2150");
+$sel->is_element_present_ok("link=2170");
+$sel->is_element_present_ok("link=2171");
+$sel->is_element_present_ok("link=2175");
+$sel->is_element_present_ok("link=2200");
+$sel->is_element_present_ok("link=2208");
+$sel->is_element_present_ok("link=2209");
+$sel->is_element_present_ok("link=2212");
+$sel->is_element_present_ok("link=2214");
+$sel->is_element_present_ok("link=2215");
+$sel->is_element_present_ok("link=2218");
+$sel->is_element_present_ok("link=2280");
+$sel->is_element_present_ok("link=2282");
+$sel->is_element_present_ok("link=2284");
+$sel->is_element_present_ok("link=2285");
+$sel->is_element_present_ok("link=2287");
+$sel->is_element_present_ok("link=2289");
+$sel->is_element_present_ok("link=2310");
+$sel->is_element_present_ok("link=2315");
+$sel->is_element_present_ok("link=2320");
+$sel->is_element_present_ok("link=2341");
+$sel->is_element_present_ok("link=2342");
+$sel->is_element_present_ok("link=2350");
+$sel->is_element_present_ok("link=2351");
+$sel->is_element_present_ok("link=2375");
+$sel->is_element_present_ok("link=2376");
+$sel->is_element_present_ok("link=2380");
+$sel->is_element_present_ok("link=2400");
+$sel->is_element_present_ok("link=2401");
+$sel->is_element_present_ok("link=2405");
+$sel->is_element_present_ok("link=2450");
+$sel->is_element_present_ok("link=2500");
+$sel->is_element_present_ok("link=2501");
+$sel->is_element_present_ok("link=2505");
+$sel->is_element_present_ok("link=2510");
+$sel->is_element_present_ok("link=2520");
+$sel->is_element_present_ok("link=2600");
+$sel->is_element_present_ok("link=2650");
+$sel->is_element_present_ok("link=2657");
+$sel->is_element_present_ok("link=2660");
+$sel->is_element_present_ok("link=2670");
+$sel->is_element_present_ok("link=2680");
+$sel->is_element_present_ok("link=2700");
+$sel->is_element_present_ok("link=2710");
+$sel->is_element_present_ok("link=2715");
+$sel->is_element_present_ok("link=2720");
+$sel->is_element_present_ok("link=2725");
+$sel->is_element_present_ok("link=2730");
+$sel->is_element_present_ok("link=2732");
+$sel->is_element_present_ok("link=2733");
+$sel->is_element_present_ok("link=2735");
+$sel->is_element_present_ok("link=2739");
+$sel->is_element_present_ok("link=2742");
+$sel->is_element_present_ok("link=2743");
+$sel->is_element_present_ok("link=2744");
+$sel->is_element_present_ok("link=2746");
+$sel->is_element_present_ok("link=2747");
+$sel->is_element_present_ok("link=2750");
+$sel->is_element_present_ok("link=2797");
+$sel->is_element_present_ok("link=3000");
+$sel->is_element_present_ok("link=3090");
+$sel->is_element_present_ok("link=3100");
+$sel->is_element_present_ok("link=3110");
+$sel->is_element_present_ok("link=3120");
+$sel->is_element_present_ok("link=3300");
+$sel->is_element_present_ok("link=3400");
+$sel->is_element_present_ok("link=3420");
+$sel->is_element_present_ok("link=3425");
+$sel->is_element_present_ok("link=3440");
+$sel->is_element_present_ok("link=3550");
+$sel->is_element_present_ok("link=3559");
+$sel->is_element_present_ok("link=3580");
+$sel->is_element_present_ok("link=3581");
+$sel->is_element_present_ok("link=3582");
+$sel->is_element_present_ok("link=3589");
+$sel->is_element_present_ok("link=3600");
+$sel->is_element_present_ok("link=3610");
+$sel->is_element_present_ok("link=3650");
+$sel->is_element_present_ok("link=3731");
+$sel->is_element_present_ok("link=3735");
+$sel->is_element_present_ok("link=3750");
+$sel->is_element_present_ok("link=3760");
+$sel->is_element_present_ok("link=3780");
+$sel->is_element_present_ok("link=3790");
+$sel->is_element_present_ok("link=3800");
+$sel->is_element_present_ok("link=3830");
+$sel->is_element_present_ok("link=3850");
+$sel->is_element_present_ok("link=3960");
+$sel->is_element_present_ok("link=3970");
+$sel->is_element_present_ok("link=3980");
+$sel->is_element_present_ok("link=3990");
+$sel->is_element_present_ok("link=4000");
+$sel->is_element_present_ok("link=4110");
+$sel->is_element_present_ok("link=4120");
+$sel->is_element_present_ok("link=4125");
+$sel->is_element_present_ok("link=4126");
+$sel->is_element_present_ok("link=4127");
+$sel->is_element_present_ok("link=4130");
+$sel->is_element_present_ok("link=4138");
+$sel->is_element_present_ok("link=4139");
+$sel->is_element_present_ok("link=4140");
+$sel->is_element_present_ok("link=4145");
+$sel->is_element_present_ok("link=4149");
+$sel->is_element_present_ok("link=4150");
+$sel->is_element_present_ok("link=4167");
+$sel->is_element_present_ok("link=4170");
+$sel->is_element_present_ok("link=4175");
+$sel->is_element_present_ok("link=4180");
+$sel->is_element_present_ok("link=4190");
+$sel->is_element_present_ok("link=4199");
+$sel->is_element_present_ok("link=4200");
+$sel->is_element_present_ok("link=4210");
+$sel->is_element_present_ok("link=4220");
+$sel->is_element_present_ok("link=4230");
+$sel->is_element_present_ok("link=4240");
+$sel->is_element_present_ok("link=4250");
+$sel->is_element_present_ok("link=4260");
+$sel->is_element_present_ok("link=4261");
+$sel->is_element_present_ok("link=4271");
+$sel->is_element_present_ok("link=4280");
+$sel->is_element_present_ok("link=4288");
+$sel->is_element_present_ok("link=4289");
+$sel->is_element_present_ok("link=4301");
+$sel->is_element_present_ok("link=4305");
+$sel->is_element_present_ok("link=4320");
+$sel->is_element_present_ok("link=4340");
+$sel->is_element_present_ok("link=4350");
+$sel->is_element_present_ok("link=4355");
+$sel->is_element_present_ok("link=4360");
+$sel->is_element_present_ok("link=4361");
+$sel->is_element_present_ok("link=4380");
+$sel->is_element_present_ok("link=4390");
+$sel->is_element_present_ok("link=4396");
+$sel->is_element_present_ok("link=4397");
+$sel->is_element_present_ok("link=4500");
+$sel->is_element_present_ok("link=4505");
+$sel->is_element_present_ok("link=4510");
+$sel->is_element_present_ok("link=4515");
+$sel->is_element_present_ok("link=4520");
+$sel->is_element_present_ok("link=4525");
+$sel->is_element_present_ok("link=4530");
+$sel->is_element_present_ok("link=4535");
+$sel->is_element_present_ok("link=4540");
+$sel->is_element_present_ok("link=4545");
+$sel->is_element_present_ok("link=4550");
+$sel->is_element_present_ok("link=4560");
+$sel->is_element_present_ok("link=4565");
+$sel->is_element_present_ok("link=4570");
+$sel->is_element_present_ok("link=4580");
+$sel->is_element_present_ok("link=4595");
+$sel->is_element_present_ok("link=4600");
+$sel->is_element_present_ok("link=4610");
+$sel->is_element_present_ok("link=4630");
+$sel->is_element_present_ok("link=4635");
+$sel->is_element_present_ok("link=4638");
+$sel->is_element_present_ok("link=4640");
+$sel->is_element_present_ok("link=4650");
+$sel->is_element_present_ok("link=4651");
+$sel->is_element_present_ok("link=4652");
+$sel->is_element_present_ok("link=4653");
+$sel->is_element_present_ok("link=4654");
+$sel->is_element_present_ok("link=4655");
+$sel->is_element_present_ok("link=4660");
+$sel->is_element_present_ok("link=4663");
+$sel->is_element_present_ok("link=4664");
+$sel->is_element_present_ok("link=4666");
+$sel->is_element_present_ok("link=4668");
+$sel->is_element_present_ok("link=4670");
+$sel->is_element_present_ok("link=4673");
+$sel->is_element_present_ok("link=4674");
+$sel->is_element_present_ok("link=4676");
+$sel->is_element_present_ok("link=4678");
+$sel->is_element_present_ok("link=4679");
+$sel->is_element_present_ok("link=4680");
+$sel->is_element_present_ok("link=4700");
+$sel->is_element_present_ok("link=4710");
+$sel->is_element_present_ok("link=4730");
+$sel->is_element_present_ok("link=4750");
+$sel->is_element_present_ok("link=4760");
+$sel->is_element_present_ok("link=4780");
+$sel->is_element_present_ok("link=4790");
+$sel->is_element_present_ok("link=4800");
+$sel->is_element_present_ok("link=4805");
+$sel->is_element_present_ok("link=4806");
+$sel->is_element_present_ok("link=4809");
+$sel->is_element_present_ok("link=4810");
+$sel->is_element_present_ok("link=4815");
+$sel->is_element_present_ok("link=4822");
+$sel->is_element_present_ok("link=4824");
+$sel->is_element_present_ok("link=4826");
+$sel->is_element_present_ok("link=4830");
+$sel->is_element_present_ok("link=4831");
+$sel->is_element_present_ok("link=4832");
+$sel->is_element_present_ok("link=4840");
+$sel->is_element_present_ok("link=4841");
+$sel->is_element_present_ok("link=4842");
+$sel->is_element_present_ok("link=4843");
+$sel->is_element_present_ok("link=4850");
+$sel->is_element_present_ok("link=4851");
+$sel->is_element_present_ok("link=4852");
+$sel->is_element_present_ok("link=4855");
+$sel->is_element_present_ok("link=4860");
+$sel->is_element_present_ok("link=4870");
+$sel->is_element_present_ok("link=4875");
+$sel->is_element_present_ok("link=4880");
+$sel->is_element_present_ok("link=4900");
+$sel->is_element_present_ok("link=4905");
+$sel->is_element_present_ok("link=4909");
+$sel->is_element_present_ok("link=4910");
+$sel->is_element_present_ok("link=4920");
+$sel->is_element_present_ok("link=4925");
+$sel->is_element_present_ok("link=4930");
+$sel->is_element_present_ok("link=4940");
+$sel->is_element_present_ok("link=4945");
+$sel->is_element_present_ok("link=4946");
+$sel->is_element_present_ok("link=4950");
+$sel->is_element_present_ok("link=4955");
+$sel->is_element_present_ok("link=4957");
+$sel->is_element_present_ok("link=4960");
+$sel->is_element_present_ok("link=4965");
+$sel->is_element_present_ok("link=4966");
+$sel->is_element_present_ok("link=4969");
+$sel->is_element_present_ok("link=4970");
+$sel->is_element_present_ok("link=4980");
+$sel->is_element_present_ok("link=4985");
+$sel->is_element_present_ok("link=4990");
+$sel->is_element_present_ok("link=4992");
+$sel->is_element_present_ok("link=4993");
+$sel->is_element_present_ok("link=4994");
+$sel->is_element_present_ok("link=4995");
+$sel->is_element_present_ok("link=8100");
+$sel->is_element_present_ok("link=8110");
+$sel->is_element_present_ok("link=8120");
+$sel->is_element_present_ok("link=8125");
+$sel->is_element_present_ok("link=8130");
+$sel->is_element_present_ok("link=8135");
+$sel->is_element_present_ok("link=8150");
+$sel->is_element_present_ok("link=8190");
+$sel->is_element_present_ok("link=8195");
+$sel->is_element_present_ok("link=8200");
+$sel->is_element_present_ok("link=8300");
+$sel->is_element_present_ok("link=8310");
+$sel->is_element_present_ok("link=8315");
+$sel->is_element_present_ok("link=8320");
+$sel->is_element_present_ok("link=8400");
+$sel->is_element_present_ok("link=8500");
+$sel->is_element_present_ok("link=8506");
+$sel->is_element_present_ok("link=8508");
+$sel->is_element_present_ok("link=8520");
+$sel->is_element_present_ok("link=8540");
+$sel->is_element_present_ok("link=8580");
+$sel->is_element_present_ok("link=8581");
+$sel->is_element_present_ok("link=8582");
+$sel->is_element_present_ok("link=8589");
+$sel->is_element_present_ok("link=8590");
+$sel->is_element_present_ok("link=8591");
+$sel->is_element_present_ok("link=8595");
+$sel->is_element_present_ok("link=8600");
+$sel->is_element_present_ok("link=8650");
+$sel->is_element_present_ok("link=8700");
+$sel->is_element_present_ok("link=8710");
+$sel->is_element_present_ok("link=8720");
+$sel->is_element_present_ok("link=8725");
+$sel->is_element_present_ok("link=8726");
+$sel->is_element_present_ok("link=8727");
+$sel->is_element_present_ok("link=8731");
+$sel->is_element_present_ok("link=8735");
+$sel->is_element_present_ok("link=8750");
+$sel->is_element_present_ok("link=8760");
+$sel->is_element_present_ok("link=8780");
+$sel->is_element_present_ok("link=8790");
+$sel->is_element_present_ok("link=8800");
+$sel->is_element_present_ok("link=8801");
+$sel->is_element_present_ok("link=8807");
+$sel->is_element_present_ok("link=8808");
+$sel->is_element_present_ok("link=8809");
+$sel->is_element_present_ok("link=8820");
+$sel->is_element_present_ok("link=8827");
+$sel->is_element_present_ok("link=8828");
+$sel->is_element_present_ok("link=8829");
+$sel->is_element_present_ok("link=8900");
+$sel->is_element_present_ok("link=8905");
+$sel->is_element_present_ok("link=8910");
+$sel->is_element_present_ok("link=8915");
+$sel->is_element_present_ok("link=8919");
+$sel->is_element_present_ok("link=8920");
+$sel->is_element_present_ok("link=8921");
+$sel->is_element_present_ok("link=8922");
+$sel->is_element_present_ok("link=8924");
+$sel->is_element_present_ok("link=8925");
+$sel->is_element_present_ok("link=8930");
+$sel->is_element_present_ok("link=8935");
+$sel->is_element_present_ok("link=8939");
+$sel->is_element_present_ok("link=8940");
+$sel->is_element_present_ok("link=8945");
+$sel->is_element_present_ok("link=8949");
+$sel->is_element_present_ok("link=8950");
+$sel->is_element_present_ok("link=8955");
+$sel->is_element_present_ok("link=8960");
+$sel->is_element_present_ok("link=8970");
+$sel->is_element_present_ok("link=8980");
+$sel->is_element_present_ok("link=8990");
+$sel->is_element_present_ok("link=9000");
+$sel->is_element_present_ok("link=9008");
+$sel->is_element_present_ok("link=9009");
+$sel->is_element_present_ok("link=9090");
+
+1;
\ No newline at end of file
--- /dev/null
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+diag("Test Account");
+
+$sel->select_frame_ok("relative=up") if (!($sel->get_title() eq "Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db}));
+$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
+$sel->click_ok("link=Konten anzeigen");
+$sel->wait_for_page_to_load($lxtest->{timeout});
+$sel->select_frame_ok("main_window");
+$sel->click_ok("link=000000000001");
+$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+# Die folegenden Zeilen testen die Checkboxen im Formular, welche nach bestimmten Regeln gelöscht werden.
+# Hiefür muß erst ein Konzept erstellt werden, wann eine Checkbox aktiviert ist und wann nicht.
+
+# Test für das erste Konto, bei dem alle Felder deaktiviert werden müssen
+isnt($sel->is_checked("//input[(\@name=\"AR_amount\")]"), 1, "Checkboxcheck");
+isnt($sel->is_checked("//input[(\@name=\"AR_paid\")]"), 1, "Checkboxcheck");
+isnt($sel->is_checked("//input[(\@name=\"AR_tax\")]"), 1, "Checkboxcheck");
+isnt($sel->is_checked("//input[(\@name=\"AP_amount\")]"), 1, "Checkboxcheck");
+isnt($sel->is_checked("//input[(\@name=\"AP_paid\")]"), 1, "Checkboxcheck");
+isnt($sel->is_checked("//input[(\@name=\"AP_tax\")]"), 1, "Checkboxcheck");
+isnt($sel->is_checked("//input[(\@name=\"IC_sale\")]"), 1, "Checkboxcheck");
+isnt($sel->is_checked("//input[(\@name=\"IC_cogs\")]"), 1, "Checkboxcheck");
+isnt($sel->is_checked("//input[(\@name=\"IC_taxpart\")]"), 1, "Checkboxcheck");
+isnt($sel->is_checked("//input[(\@name=\"IC_income\")]"), 1, "Checkboxcheck");
+isnt($sel->is_checked("//input[(\@name=\"IC_expense\")]"), 1, "Checkboxcheck");
+isnt($sel->is_checked("//input[(\@name=\"IC_taxservice\")]"), 1, "Checkboxcheck");
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Delete product groups");
+TODO: {
+ local $TODO = "Benutzte Preisgruppen können nicht gelöscht werden!";
-if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
- require_ok("../../begin/B004Login.t");
-}
+ if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
+ require_ok("../../begin/B004Login.t");
+ }
-$sel->select_frame_ok("relative=up");
-$sel->click_ok("link=Warengruppen anzeigen");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->select_frame_ok("main_window");
-$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->click_ok("link=TestSeleniumWarengruppe1");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->click_ok("document.forms[0].action[1]");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->click_ok("link=TestSeleniumWarengruppe2");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->click_ok("document.forms[0].action[1]");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->click_ok("link=TestSeleniumWarengruppe3");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->click_ok("document.forms[0].action[1]");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
\ No newline at end of file
+ $sel->select_frame_ok("relative=up");
+ $sel->click_ok("link=Warengruppen anzeigen");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->select_frame_ok("main_window");
+ $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("link=TestSeleniumWarengruppe1");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("document.forms[0].action[1]");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("link=TestSeleniumWarengruppe2");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("document.forms[0].action[1]");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("link=TestSeleniumWarengruppe3");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("document.forms[0].action[1]");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+}
+1;
\ No newline at end of file
--- /dev/null
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
+diag("Delete Account");
+
+$sel->select_frame_ok("relative=up");
+$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
+$sel->click_ok("link=Konten anzeigen");
+$sel->wait_for_page_to_load($lxtest->{timeout});
+$sel->select_frame_ok("main_window");
+$sel->click_ok("link=000000000001");
+$sel->wait_for_page_to_load_ok("30000");
+$sel->click_ok("document.EditAccount.action[1]");
+$sel->wait_for_page_to_load_ok("30000");
+isnt($sel->is_element_present("link=000000000001"),1,"Tests whether link for created acc is present");
+isnt($sel->is_text_present("TestSeleniumKonto"),1,"Tests wheter text of created acc is present");
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Delete customer/vendor types");
$sel->select_frame_ok("relative=up");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
$sel->click_ok("document.forms[0].action[1]");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Delete payment conditions");
$sel->select_frame_ok("relative=up");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
$sel->click_ok("document.forms[0].action[1]");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Delete languages");
$sel->select_frame_ok("relative=up");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
$sel->click_ok("document.forms[0].action[1]");
$sel->wait_for_page_to_load_ok($lxtest->{timeout});
+1;
\ No newline at end of file
+if(!defined $sel) {
+ require "t/selenium/AllTests.t";
+ init_server("singlefileonly",$0);
+ exit(0);
+}
diag("Delete price brackets");
+TODO: {
+ local $TODO = "Benutzte Preisgruppen können nicht gelöscht werden!";
+
+ if(!$sel->get_title("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db})){
+ require_ok("../../begin/B004Login.t");
+ }
-$sel->select_frame_ok("relative=up");
-$sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
-$sel->click_ok("link=Preisgruppen anzeigen");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->select_frame_ok("main_window");
-$sel->click_ok("action");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->click_ok("link=SeleniumTestPreisgruppe1");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->click_ok("document.forms[0].action[1]");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->click_ok("link=SeleniumTestPreisgruppe2");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
-$sel->click_ok("document.forms[0].action[1]");
-$sel->wait_for_page_to_load_ok($lxtest->{timeout});
\ No newline at end of file
+ $sel->select_frame_ok("relative=up");
+ $sel->title_is("Lx-Office Version 2.4.3 - Selenium - " . $lxtest->{db});
+ $sel->click_ok("link=Preisgruppen anzeigen");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->select_frame_ok("main_window");
+ $sel->click_ok("action");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("link=SeleniumTestPreisgruppe1");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("document.forms[0].action[1]");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("link=SeleniumTestPreisgruppe2");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+ $sel->click_ok("document.forms[0].action[1]");
+ $sel->wait_for_page_to_load_ok($lxtest->{timeout});
+}
+1;
\ No newline at end of file