@testim/testim-cli
Version:
Command line interface for running Testing on you CI
27 lines (22 loc) • 652 B
JavaScript
/**
* Change focus to another frame on the page. If the frame id is null,
* the server should switch to the page's default content.
*
* @param {String|Number|null|WebElementJSONObject} id Identifier for the frame to change focus to.
*
* @see https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/frame
* @type protocol
*
*/
module.exports = function frame (frameId) {
/*!
* parameter check
*/
if (arguments.length === 0 || typeof frameId === 'function') {
frameId = null;
}
return this.requestHandler.create(
'/session/:sessionId/frame',
{id: frameId}
);
};