cabbie-sync
Version:
A synchronous webdriver client
37 lines (32 loc) • 850 B
Flow
/**
* @flow
* This file is generated automatically, run npm run build to re-generate.
**/
import type Driver from './driver';
import addDebugging from './add-debugging';
import BaseClass from './base-class';
class Frame extends BaseClass {
constructor(driver: Driver) {
super(driver, '/frame');
}
/*
* Change focus to the default context on the page
*/
activateDefault(): void {
this.requestJSON('POST', '', { id: null });
}
/*
* Change focus to a specific frame on the page
*/
activate(id: string): void {
this.requestJSON('POST', '', { id });
}
/*
* Change focus to the parent context. If the current context is the top level browsing context, the context remains unchanged.
*/
activateParent(): void {
this.requestJSON('POST', '/parent');
}
}
addDebugging(Frame);
export default Frame;