Add window/:windowhandle/maximize route as noop

Mobile browsers are always fullscreen. Make this endpoint a noop.
This commit is contained in:
Simon Boudrias 2015-03-26 15:37:31 -07:00
Родитель 91de63f29b
Коммит 28c7102ccd
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -701,6 +701,11 @@ exports.getWindowSize = function (req, res) {
req.device.getWindowSize(windowHandle, getResponseHandler(req, res));
};
exports.maximizeWindow = function (req, res) {
// noop
respondSuccess(req, res);
};
exports.getPageIndex = function (req, res) {
var elementId = req.params.elementId;
req.device.getPageIndex(elementId, getResponseHandler(req, res));

Просмотреть файл

@ -64,6 +64,7 @@ module.exports = function (appium) {
rest.post('/wd/hub/session/:sessionId?/window', controller.setWindow);
rest.delete('/wd/hub/session/:sessionId?/window', controller.closeWindow);
rest.get('/wd/hub/session/:sessionId?/window/:windowhandle?/size', controller.getWindowSize);
rest.post('/wd/hub/session/:sessionId?/window/:windowhandle/maximize', controller.maximizeWindow);
rest.post('/wd/hub/session/:sessionId?/execute', controller.execute);
rest.post('/wd/hub/session/:sessionId?/execute_async', controller.executeAsync);
rest.get('/wd/hub/session/:sessionId?/title', controller.title);
@ -156,7 +157,6 @@ var routeNotYetImplemented = function (rest) {
rest.post('/wd/hub/session/:sessionId?/window/:windowhandle/size', controller.notYetImplemented);
rest.post('/wd/hub/session/:sessionId?/window/:windowhandle/position', controller.notYetImplemented);
rest.get('/wd/hub/session/:sessionId?/window/:windowhandle/position', controller.notYetImplemented);
rest.post('/wd/hub/session/:sessionId?/window/:windowhandle/maximize', controller.notYetImplemented);
rest.get('/wd/hub/session/:sessionId?/element/:elementId?', controller.notYetImplemented);
rest.post('/wd/hub/session/:sessionId?/buttondown', controller.notYetImplemented);
rest.post('/wd/hub/session/:sessionId?/buttonup', controller.notYetImplemented);