fix command

pull/2928/head
filip mertens 2 years ago
parent 2cbfb34873
commit 19361362b9
  1. 15
      apps/remix-ide-e2e/src/commands/debugTransaction.ts

@ -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

Loading…
Cancel
Save