修改完成
This commit is contained in:
@@ -124,6 +124,17 @@ const prepareA01LoginState = async (send, action) => {
|
||||
}
|
||||
}
|
||||
|
||||
const prepareG01State = async (send, action) => {
|
||||
if (action === 'g01-add-dialog') {
|
||||
await send('Runtime.evaluate', { expression: "document.querySelector('.create-action')?.click()" })
|
||||
await waitForSelector(send, '.add-dialog-layer', 'G01 add dialog did not render')
|
||||
return
|
||||
}
|
||||
if (action !== 'g01-switcher') return
|
||||
await send('Runtime.evaluate', { expression: "document.querySelector('.current-slip')?.click()" })
|
||||
await waitForSelector(send, '.genealogy-switcher-layer', 'G01 switcher did not render')
|
||||
}
|
||||
|
||||
const waitForRequestedUrl = async (send, url) => {
|
||||
for (let attempt = 0; attempt < 30; attempt += 1) {
|
||||
const result = await send('Runtime.evaluate', {
|
||||
@@ -506,7 +517,10 @@ const capture = async () => {
|
||||
await sleep(100)
|
||||
}
|
||||
|
||||
await send('Runtime.evaluate', { expression: 'scrollTo(0, 0)' })
|
||||
|
||||
await prepareA01LoginState(send, action)
|
||||
await prepareG01State(send, action)
|
||||
await prepareG06State(send, action)
|
||||
await prepareG03State(send, action)
|
||||
await prepareG08State(send, action)
|
||||
|
||||
Reference in New Issue
Block a user