|
|
@ -36,15 +36,8 @@ class Bilibili extends HeroBot { |
|
|
|
|
|
|
|
|
|
|
|
//等待所有内容加载完成
|
|
|
|
//等待所有内容加载完成
|
|
|
|
const tab = await hero.activeTab; |
|
|
|
const tab = await hero.activeTab; |
|
|
|
await tab.waitForLoad('AllContentLoaded', {timeoutMs: configs.heroTabOptions.timeoutMs}); |
|
|
|
await tab.waitForLoad('DomContentLoaded', {timeoutMs: configs.heroTabOptions.timeoutMs}); |
|
|
|
await hero.waitForState({ |
|
|
|
await hero.waitForPaintingStable({timeoutMs: configs.heroTabOptions.timeoutMs}); |
|
|
|
all(assert) { |
|
|
|
|
|
|
|
assert( |
|
|
|
|
|
|
|
hero.document.title, |
|
|
|
|
|
|
|
text => text != '', |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}, {timeoutMs: configs.heroTabOptions.timeoutMs}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//解析网页HTML数据
|
|
|
|
//解析网页HTML数据
|
|
|
|
data.title = await hero.document.title; |
|
|
|
data.title = await hero.document.title; |
|
|
|