Driver
import {Driver} from 'cabbie-sync';
Create a new Driver session, remember to call .dispose()
at the end to terminate the session.
Properties
activeWindow: ActiveWindow
The currently active window. This has most of the methods to interact with the the current page.
cookieStorage: CookieStorage
Get the Cookie-Storage object.
ime: IME
Get the IME object.
localStorage: LocalStorage
Get the Local-Storage object.
options: Options
The options that were originally passed in to createCabbieDriver
remote: string
The location of the selenium server
session: Session
The current session. You can pass this session to createCabbieDriver to convert between sync and async drivers. e.g.
const driver = createCabbieDriver(oldDriver.remote, { ...oldDriver.options, session: oldDriver.session });
sessionStorage: SessionStorage
Get the Session-Storage object.
timeOut: TimeOut
Timeout configuration
Methods
dispose(status): void
- status
- Object
End this Driver session
getApplicationCacheStatus(): ApplicationCacheStatus
Get the status of the html5 application cache
getGeoLocation(): {latitude:number, longitude:number, altitude:number}
Get the current geo location
getLogTypes(): Array<string>
Get available log types
getLogs(logType): Array<LogEntry>
- logType
- string
Get the log for a given log type. Log buffer is reset after each request.
getOrientation(): BrowserOrientation
Get the current browser orientation
getWindows(): Array<WindowHandle>
Get an array of windows for all available windows
sauceJobUpdate(body): boolean
- body
- Object
Sauce Labs Methods
setGeoLocation(loc): void
- loc
- {latitude:number, longitude:number, altitude:number}
Set the current geo location