|
|
@ -83,8 +83,21 @@ const checkForAcceptAndRemember = async function (browser: NightwatchBrowser) { |
|
|
|
browser.frameParent(() => { |
|
|
|
browser.frameParent(() => { |
|
|
|
browser.pause(1000).element('xpath', '//*[@data-id="permissionHandlerRememberUnchecked"]', (visible: any) => { |
|
|
|
browser.pause(1000).element('xpath', '//*[@data-id="permissionHandlerRememberUnchecked"]', (visible: any) => { |
|
|
|
if (visible.status && visible.status === -1) { |
|
|
|
if (visible.status && visible.status === -1) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
browser.pause(1000).element('xpath', '//*[@data-id="PermissionHandler-modal-footer-ok-react"]', (visiblePermission: any) => { |
|
|
|
|
|
|
|
if (visiblePermission.status && visiblePermission.status === -1) { |
|
|
|
// @ts-ignore
|
|
|
|
// @ts-ignore
|
|
|
|
browser.frame(0, () => { resolve(true) }) |
|
|
|
browser.frame(0, () => { resolve(true) }) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
browser.click('//*[@data-id="PermissionHandler-modal-footer-ok-react"]', () => { |
|
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
|
|
|
browser.frame(0, () => { resolve(true) }) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
browser.waitForElementVisible('//*[@data-id="permissionHandlerRememberUnchecked"]').click('//*[@data-id="permissionHandlerRememberUnchecked"]').waitForElementVisible('//*[@data-id="PermissionHandler-modal-footer-ok-react"]').click('//*[@data-id="PermissionHandler-modal-footer-ok-react"]', () => { |
|
|
|
browser.waitForElementVisible('//*[@data-id="permissionHandlerRememberUnchecked"]').click('//*[@data-id="permissionHandlerRememberUnchecked"]').waitForElementVisible('//*[@data-id="PermissionHandler-modal-footer-ok-react"]').click('//*[@data-id="PermissionHandler-modal-footer-ok-react"]', () => { |
|
|
|
// @ts-ignore
|
|
|
|
// @ts-ignore
|
|
|
|