UNPKG

3.44 kBJavaScriptView Raw
1'use strict';
2
3var Alert = require('./lib/alert');
4var ActiveWindow = require('./lib/activeWindow');
5var Browser = require('./lib/browser');
6var Cookie = require('./lib/cookie');
7var CookieStorage = require('./lib/cookieStorage');
8var Driver = require('./lib/driver');
9var Element = require('./lib/element');
10var Frame = require('./lib/frame');
11var GlobalMouse = require('./lib/globalMouse');
12var GlobalTouch = require('./lib/globalTouch');
13var IME = require('./lib/ime');
14var Keys = require('./lib/keys');
15var LocalStorage = require('./lib/localStorage');
16var LogEntry = require('./lib/logEntry');
17var Mouse = require('./lib/mouse');
18var Navigator = require('./lib/navigator');
19var Session = require('./lib/session');
20var SessionStorage = require('./lib/sessionStorage');
21var Status = require('./lib/status');
22var TimeOut = require('./lib/timeOut');
23var Touch = require('./lib/touch');
24var WindowHandler = require('./lib/window');
25
26module.exports = Cabbie;
27
28/**
29 * Create a new browser session
30 *
31 * <img src="../../objectReference.png" />
32 *
33 * Note: Remember to call `.dispose()` at the end to terminate the session.
34 *
35 * @constructor
36 * @class Cabbie
37 * @module Cabbie
38 * @param {String|Object} remote Request object or URL to selenium-server
39 * @param {Object} capabilities See capabilities in {{#crossLink "Session"}}{{/crossLink}}
40 * @param {Object} options
41 * @param {String} options.mode Mode of web-driver requests (Browser.MODE_SYNC|Browser.MODE_ASYNC)
42 * @param {String} [options.base] Base-url
43 * @param {String} [options.sessionID]
44 * @param {Boolean} [options.debug=false]
45 * @param {Boolean} [options.httpDebug=false]
46 */
47function Cabbie(remote, capabilities, options) {
48 return new Driver(remote, capabilities, options);
49}
50
51
52/**
53 * @property ActiveWindow
54 * @type {ActiveWindow}
55 */
56Cabbie.ActiveWindow = ActiveWindow;
57
58/**
59 * @property Alert
60 * @type {Alert}
61 */
62Cabbie.Alert = Alert;
63
64/**
65 * @property Browser
66 * @type Browser
67 */
68Cabbie.Browser = Browser;
69
70/**
71 * @property Cookie
72 * @type Cookie
73 */
74Cabbie.Cookie = Cookie;
75
76/**
77 * @property CookieStorage
78 * @type CookieStorage
79 */
80Cabbie.CookieStorage = CookieStorage;
81
82/**
83 * @property Driver
84 * @type Driver
85 */
86Cabbie.Driver = Driver;
87
88/**
89 * @property Element
90 * @type Element
91 */
92Cabbie.Element = Element;
93
94/**
95 * @property Frame
96 * @type Frame
97 */
98Cabbie.Frame = Frame;
99
100/**
101 * @property GlobalMouse
102 * @type GlobalMouse
103 */
104Cabbie.GlobalMouse = GlobalMouse;
105
106/**
107 * @property GlobalTouch
108 * @type GlobalTouch
109 */
110Cabbie.GlobalTouch = GlobalTouch;
111
112/**
113 * @property IME
114 * @type IME
115 */
116Cabbie.IME = IME;
117
118/**
119 * @property Keys
120 * @type Keys
121 */
122Cabbie.Keys = Keys;
123
124/**
125 * @property LocalStorage
126 * @type LocalStorage
127 */
128Cabbie.LocalStorage = LocalStorage;
129
130/**
131 * @property LogEntry
132 * @type LogEntry
133 */
134Cabbie.LogEntry = LogEntry;
135
136/**
137 * @property Mouse
138 * @type Mouse
139 */
140Cabbie.Mouse = Mouse;
141
142/**
143 * @property Navigator
144 * @type Navigator
145 */
146Cabbie.Navigator = Navigator;
147
148/**
149 * @property Session
150 * @type Session
151 */
152Cabbie.Session = Session;
153
154/**
155 * @property SessionStorage
156 * @type SessionStorage
157 */
158Cabbie.SessionStorage = SessionStorage;
159
160/**
161 * @property Status
162 * @type Status
163 */
164Cabbie.Status = Status;
165
166/**
167 * @property TimeOut
168 * @type TimeOut
169 */
170Cabbie.TimeOut = TimeOut;
171
172/**
173 * @property Touch
174 * @type Touch
175 */
176Cabbie.Touch = Touch;
177
178/**
179 * @property WindowHandler
180 * @type WindowHandler
181 */
182Cabbie.WindowHandler = WindowHandler;