3 # NOTEST: some preruns for initializing missing parameters
4 $sel->open($lxtest->{lxadmin});
5 $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]");
6 $sel->wait_for_page_to_load($lxtest->{timeout});
7 $sel->type("dbuser", $lxtest->{dbuser});
8 $sel->type("dbpasswd", $lxtest->{dbpasswd});
9 $sel->type("dbuser", $lxtest->{dbuser});
10 $sel->type("dbhost", $lxtest->{dbhost});
11 $sel->type("dbport", $lxtest->{dbport});
12 $sel->type("dbdefault", $lxtest->{dbdefault});
13 $sel->click("//input[(\@name=\"action\") and (\@value=\"Datenbank aktualisieren\")]");
14 $sel->wait_for_page_to_load($lxtest->{timeoutlong});
15 $sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank aktualisieren -");
19 while (){ # count the number of radiobuttons
20 eval { $sel->is_checked("//input[(\@id=\"$count\")]"); };
21 if ( $@ ) { $count--; last; };
25 #TEST: Now run the Tests
27 $sel->open_ok($lxtest->{lxadmin});
28 $sel->title_is("Lx-Office ERP Administration -");
30 #diag('Lock the system');
31 #$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System sperren\")]");
32 #$sel->wait_for_page_to_load_ok($lxtest->{timeout});
34 diag('Update the database');
36 $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbankadministration\")]");
37 $sel->wait_for_page_to_load_ok($lxtest->{timeout});
38 $sel->title_is("Lx-Office ERP / Datenbankadministration -");
39 $sel->type_ok("dbuser", $lxtest->{dbuser});
40 $sel->type_ok("dbpasswd", $lxtest->{dbpasswd});
41 $sel->type_ok("dbuser", $lxtest->{dbuser});
42 $sel->type_ok("dbhost", $lxtest->{dbhost});
43 $sel->type_ok("dbport", $lxtest->{dbport});
44 $sel->type_ok("dbdefault", $lxtest->{dbdefault});
45 $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Datenbank aktualisieren\")]");
46 $sel->wait_for_page_to_load_ok($lxtest->{timeoutlong});
47 $sel->title_is("Lx-Office ERP Datenbankadministration / Datenbank aktualisieren -");
49 for (my $i=0; $i <= $count; $i++){
50 $sel->uncheck_ok("//input[(\@id=\"$i\")]");
53 #$sel->click_ok("//input[\@value=\"$lxtest->{db}\"]");
54 $sel->check_ok("//input[\@name=\"db$lxtest->{db}\"]");
55 $sel->click_ok("//input[(\@name=\"action\") and (\@value=\"Weiter\")]");
56 $sel->title_like( qr/Lx-Office ERP Datenbankadministration/ );
58 #diag('Unlock the system');
59 #$sel->click_ok("//input[(\@name=\"action\") and (\@value=\"System entsperren\")]");
60 #$sel->wait_for_page_to_load_ok($lxtest->{timeout});
61 #$sel->title_is("Lx-Office ERP Administration -");