#This test script requires Selenium RC Server 1.0.1 to be running on localhost default port 4444 #If you wish to use a different port or server then add the extra two parameters to the "new selenium" line. # #Goto http://seleniumhq.org/download/ to download selenium RC 1.0.1 # #This script will open www.testscriptrunner.com which both iexplore and firefox. It will #cycle through all the pages and take a screenshot of each page. #tsrTest parameters #string seleniumBrowserType without the leading asterix function tsrTest wintester = new windows() pages = "Home","Details","Download","Example Scripts","FAQ","Results Analysis","Purchase","Patches","Support","Tester Plug-in Modules","Contact Us","Company Details" seleniumBrowserType = sprintf("*%s",tsrTest[0]) s = new selenium("http://www.testscriptrunner.com/", seleniumBrowserType) s.open("/") win = wintester.waitfor(20,"Test Script Runner - ") assert(win != failed,"Check for Test Script Runner window") s.windowmaximize() s.windowfocus() if win != failed then p = 0 while p < arraylength(pages) do link = sprintf("link=%s",pages[p]) s.clickAndWait(link) sleep(5) bmpFile = sprintf("%s%s_%s.bmp",scriptdir,tsrTest[0],pages[p]) wintester.captureScreenShot(win,bmpFile) movelogfile(bmpFile) p++ endwhile endif delete s delete wintester endfunction tsrTest("iexplore") tsrTest("firefox")