diff --git a/selenium/README b/selenium/README index 83ef22362..40d09820b 100644 --- a/selenium/README +++ b/selenium/README @@ -19,7 +19,7 @@ Download the Selenium server from: http://seleniumhq.org/download/) Running the Selenium Server (run in a separate command line/window) java -jar selenium-server-standalone-2.24.1.jar - The -browserSessionReuse is to keep the selenium session open so you may troubleshoot page issues + The -browserSessionReuse is to keep the selenium session open so you may troubleshoot page issues (helpful for test writers) The Selenium software automatically closes the browser when the tests are concluded. If you are writing/troubleshooting tests and need the browser to remain open use: java -jar selenium-server-standalone-2.24.1.jar -browserSessionReuse @@ -44,5 +44,21 @@ Download and install the Selenium IDE from: http://seleniumhq.org/projects/ide/ Take a look at the Selenium IDE documentation: http://seleniumhq.org/docs/02_selenium_ide.html Youtube videos can be quite handy: + http://www.youtube.com/watch?v=MXuhevKqImI http://www.youtube.com/watch?v=i4NTGUm6oeQ - http://www.youtube.com/results?search_query=selenium+tutorial+for+beginner \ No newline at end of file + http://www.youtube.com/results?search_query=selenium+tutorial+for+beginner + +Errors: + + $ perl test.pl + 1..98 + Error requesting http://localhost:4444/selenium-server/driver/: + 500 Can't connect to localhost:4444 (Connection refused) + # Looks like your test exited with 61 before it could output anything. + --- this means you forgot to run the Selenium server or you are not running the Selenium server on the same + host:port as specified in your webgui.conf file. + +Perl requirements: + Test::WWW::Selenium + Test::WWW::Selenium::HTML + diff --git a/selenium/frameless/activeSessions.html b/selenium/frameless/activeSessions.html index d5d1a5856..9eef839f5 100644 --- a/selenium/frameless/activeSessions.html +++ b/selenium/frameless/activeSessions.html @@ -17,11 +17,15 @@ - assertElementPresent + verifyElementPresent + css=img[alt="Delete"] + + + + clickAndWait css=img[alt="Delete"] - diff --git a/selenium/frameless/addons.html b/selenium/frameless/addons.html index 219b3f938..5e825d02c 100644 --- a/selenium/frameless/addons.html +++ b/selenium/frameless/addons.html @@ -11,27 +11,21 @@ Addons + + open + /?op=viewActiveSessions + + click link=Show admin console. - clickAndWait - css=img[alt="Addons"] - + assertText + link=Addons + Addons - - assertLocation - - http://www.webgui.org/addons - - - open - - / - - diff --git a/selenium/frameless/advertising.html b/selenium/frameless/advertising.html index ced1fc0d7..6d14233a6 100644 --- a/selenium/frameless/advertising.html +++ b/selenium/frameless/advertising.html @@ -11,9 +11,74 @@ Advertising + + open + /?op=manageAdSpaces + + clickAndWait - css=img[alt="Advertising"] + link=Add ad space. + + + + type + id=name_formId + testAd + + + type + id=title_formId + Just a test Ad + + + type + id=description_formId + Just a test ad to ... + + + clickAndWait + xpath=(//input[@value='save'])[2] + + + + clickAndWait + link=Manage ad spaces. + + + + verifyTextPresent + Just a test Ad + + + + clickAndWait + css=img[alt="Edit"] + + + + type + id=title_formId + Just a test Ad (Changed) + + + clickAndWait + css=input[type="submit"] + + + + verifyTextPresent + Just a test Ad (Changed) + + + + click + css=img[alt="Delete"] + + + + assertConfirmation + Are you certain you want to delete this ad space and all the ads attached to it? @@ -21,7 +86,6 @@ id=application_title Advertising - diff --git a/selenium/frameless/assetHistory.html b/selenium/frameless/assetHistory.html index 1429e3cec..16d8deaa9 100644 --- a/selenium/frameless/assetHistory.html +++ b/selenium/frameless/assetHistory.html @@ -12,8 +12,8 @@ Asset History - clickAndWait - css=img[alt="Asset History"] + open + /?op=assetHistory @@ -21,7 +21,6 @@ id=application_title Asset History - diff --git a/selenium/frameless/cache.html b/selenium/frameless/cache.html index 331eda879..39ec80dfd 100644 --- a/selenium/frameless/cache.html +++ b/selenium/frameless/cache.html @@ -12,8 +12,8 @@ Cache - clickAndWait - css=img[alt="Cache"] + open + /?op=manageCache @@ -26,7 +26,6 @@ css=input[type="button"] - diff --git a/selenium/frameless/clipboard.html b/selenium/frameless/clipboard.html index 9cd955e55..73b0b7204 100644 --- a/selenium/frameless/clipboard.html +++ b/selenium/frameless/clipboard.html @@ -13,12 +13,7 @@ open - /?op=viewActiveSessions# - - - - clickAndWait - css=img[alt="Clipboard"] + /?func=manageClipboard @@ -36,7 +31,6 @@ //input[@value='Delete'] - diff --git a/selenium/frameless/showAdminConsole.html b/selenium/frameless/showAdminConsole.html deleted file mode 100644 index 3e926fd0c..000000000 --- a/selenium/frameless/showAdminConsole.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - -showAdminConsole - - - - - - - - - - - - - - - - -
showAdminConsole
open/?op=viewActiveSessions
clicklink=Show admin console.
- - diff --git a/selenium/frameless/suite.html b/selenium/frameless/suite.html index b7555dc7f..f920e1572 100644 --- a/selenium/frameless/suite.html +++ b/selenium/frameless/suite.html @@ -9,17 +9,11 @@ - - - - - -
Test Suite
Active Sessions
showAdminConsole
Addons
showAdminConsole
Advertising
showAdminConsole
Asset History
showAdminConsole
Cache
showAdminConsole
Clipboard
showAdminConsole
diff --git a/selenium/test.pl b/selenium/test.pl index 210c289b9..ce5df814a 100644 --- a/selenium/test.pl +++ b/selenium/test.pl @@ -1,5 +1,5 @@ #!/usr/bin/perl -use Test::More tests => 98; +use Test::More tests => 159; use Test::WWW::Selenium; use Test::WWW::Selenium::HTML; use WebGUI::Paths -inc; @@ -42,13 +42,13 @@ my $selh = Test::WWW::Selenium::HTML->new( $sel ); $selh->diag_body_text_on_failure(0); #------------------------- Run All Tests here ----------------------- - +# Test basic interface links ok(1, "Login test"); $selh->run(path => "login.html"); ok(1, "Turn On Admin test"); $selh->run(path => "turnOnAdmin.html"); ok(1, "Admin Console tests"); -$selh->run(path => "turnOnAdmin.html"); +$selh->run(path => "adminConsole.html"); ok(1, "Version Tags tests"); $selh->run(path => "versionTags.html"); ok(1, "Clipboard test"); @@ -67,3 +67,17 @@ ok(1, "New Content->Shop tests"); $selh->run(path => "newContentShop.html"); ok(1, "New Content->Utilities tests"); $selh->run(path => "newContentUtilities.html"); + +# +ok(1, "FRAMELESS->Active Sessions"); +$selh->run(path => "frameless/activeSessions.html"); +ok(1, "FRAMELESS->Addons"); +$selh->run(path => "frameless/addons.html"); +ok(1, "FRAMELESS->Advertising"); +$selh->run(path => "frameless/advertising.html"); +ok(1, "FRAMELESS->Asset History"); +$selh->run(path => "frameless/assetHistory.html"); +ok(1, "FRAMELESS->Cache"); +$selh->run(path => "frameless/cache.html"); +ok(1, "FRAMELESS->Clipboard"); +$selh->run(path => "frameless/clipboard.html");