Menu

[r12]: / trunk / examples / tiddlyReportTest.lua  Maximize  Restore  History

Download this file

35 lines (25 with data), 865 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
--Describe how to produce a tiddly report
dofile("../lib/selenium.lua")
dofile("../lib/luaunit.lua")
dofile("../lib/tiddlyReport .lua") --include report library
-- Set report name and path
Report:setName("Test Set")
Report:setPath("report/reports.html")
TestSet = {} --Test class
function TestSet:setUp()
--Open tiddly wiki reports
tiddly.open()
self.sele = selenium.new ('*googlechrome','http://www.w3schools.com/','127.0.0.1','4444','3000')
self.sele:start()
end
function TestSet:test_CheckOptions()
self.sele:open('/tags/tryit.asp?filename=tryhtml_option')
self.sele:waitForPageToLoad('3000')
options = self.sele:getSelectOptions("css=select")
table.getn(options)
assertEquals(table.getn(options),4)
end
function TestSet:tearDown()
self.sele:stop()
end
LuaUnit:run('TestSet') -- will execute only one class of test
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.