提交 79451855 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

fix driver valid function

上级 988dce8c
......@@ -133,7 +133,8 @@ export class BrowserDriver {
const valid = await this.valid(driver)
if (!valid) {
log.warn('PuppetWebBrowserDriver', 'getChromeDriver() got invalid driver')
err = new Error('getChromeDriver() got invalid driver')
log.warn('PuppetWebBrowserDriver', err.message)
driver = null
}
......@@ -242,7 +243,7 @@ export class BrowserDriver {
let two
try {
two = await this.executeScript('return 1+1')
two = await driver.executeScript('return 1+1')
} catch (e) {
two = e
log.warn('BrowserDriver', 'valid() fail: %s', e.message)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册