|
|
|
@ -14,13 +14,26 @@ class debugTransaction extends EventEmitter { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function checkStyle(browser: NightwatchBrowser, index: number, callback: VoidFunction) { |
|
|
|
|
browser.pause(5000).execute(function (index: number) { |
|
|
|
|
let elementsFound = 0 |
|
|
|
|
browser.waitUntil(() => { |
|
|
|
|
browser.findElements({ |
|
|
|
|
selector: '*[data-shared="txLoggerDebugButton"]', |
|
|
|
|
timeout: 60000, |
|
|
|
|
}, (result) => { |
|
|
|
|
if (Array.isArray(result.value) && result.value.length > 0) { |
|
|
|
|
elementsFound = result.value.length |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
return elementsFound > index |
|
|
|
|
}, 60000) |
|
|
|
|
.execute(function (index: number) { |
|
|
|
|
const debugBtn = document.querySelectorAll('*[data-shared="txLoggerDebugButton"]')[index] as HTMLInputElement |
|
|
|
|
|
|
|
|
|
debugBtn && debugBtn.click() |
|
|
|
|
}, [index], function () { |
|
|
|
|
browser.waitForElementVisible('*[data-id="buttonNavigatorJumpPreviousBreakpoint"]', 60000).perform(() => callback()) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
module.exports = debugTransaction |
|
|
|
|