run之后,我希望自动关闭浏览器,但是调用hide 无法生效,请问用法错误了吗?
run 返回的是promise,run 后不能再链式调用 hide(),
ubrowser.hide() 无法生效
window.exports = {
'hello': {
mode: 'list',
args: {
enter: async (action) => {
const res = await utools.ubrowser.goto('https://yuanliao.info')
.wait('button[title=退出]')
.cookies('flarum_session')
.run({ width: 1000, height: 800 })
console.log(res);
utools.ubrowser.hide()
utools.clearUBrowserCache()
utools.dbStorage.setItem('token', res[0].value)
}
}
}}
各位开发大神,可以帮忙看看嘛
utools.ubrowser.hide().goto('https://yuanliao.info')