01: package org.ddsteps.web.trail;
02:
03: import java.io.File;
04:
05: /**
06: * Interface for trail writers.
07: *
08: * @author adamskogman
09: *
10: */
11: public interface WebTrail {
12:
13: /**
14: * @see org.ddsteps.web.WebBrowser#endTrail()
15: */
16: public void endTrail();
17:
18: /**
19: * @return Trail folder if set.
20: * @see org.ddsteps.web.WebBrowser#getTrailFolder()
21: */
22: public File getTrailFolder();
23:
24: /**
25: * @return True if trail is enabled.
26: * @see org.ddsteps.web.WebBrowser#isTrailEnabled()
27: */
28: public boolean isTrailEnabled();
29:
30: /**
31: * @param trailEnabled
32: * @see org.ddsteps.web.WebBrowser#setTrailEnabled(boolean)
33: */
34: public void setTrailEnabled(boolean trailEnabled);
35:
36: /**
37: * @param trailFolder
38: * The folder to create trails in.
39: * @see org.ddsteps.web.WebBrowser#setTrailFolder(java.io.File)
40: */
41: public void setTrailFolder(File trailFolder);
42:
43: /**
44: * @param trailName
45: * @see org.ddsteps.web.WebBrowser#startTrail(java.lang.String)
46: */
47: public void startTrail(String trailName);
48:
49: /**
50: * Writes one page of the trail.
51: *
52: * @param trailPage
53: */
54: public void writeTrail(TrailPage trailPage);
55:
56: /**
57: * Write the current page to a file, regardless of any current trail or if
58: * trailing is enabled or not.
59: * <p>
60: * If you want a full trail of everything the test sees, use the trail
61: * functionalit instead.
62: *
63: * @param filename
64: * Relative filename in the trail folder, or a full file name.
65: * @param encoding
66: * The encoding to use.
67: * @param pageAsString
68: * The string to write.
69: */
70: public void writePage(String filename, String encoding,
71: String pageAsString);
72:
73: }
|