change click command to use css selector locator strategy

pull/2904/head
Joseph Izang 2 years ago
parent 81ae5ee9ed
commit 17a28113f2
  1. 7
      apps/remix-ide-e2e/src/commands/addAtAddressInstance.ts

@ -21,7 +21,12 @@ function addInstance (browser: NightwatchBrowser, address: string, isValidFormat
.setValue('.ataddressinput', address, function () { .setValue('.ataddressinput', address, function () {
if (!isValidFormat || !isValidChecksum) browser.assert.elementPresent('button[id^="runAndDeployAtAdressButton"]:disabled') if (!isValidFormat || !isValidChecksum) browser.assert.elementPresent('button[id^="runAndDeployAtAdressButton"]:disabled')
else if (isAbi) { else if (isAbi) {
browser.click('button[data-id="runAndDeployAtAdressButton"]') browser
// .click('button[data-id="runAndDeployAtAdressButton"]')
.click({
locateStrategy: 'css selector',
selector: 'span > button[id="runAndDeployAtAdressButton"]'
})
.waitForElementPresent('[data-id="udappNotify-modal-footer-ok-react"]') .waitForElementPresent('[data-id="udappNotify-modal-footer-ok-react"]')
.execute(function () { .execute(function () {
const modal = document.querySelector('[data-id="udappNotify-modal-footer-ok-react"]') as any const modal = document.querySelector('[data-id="udappNotify-modal-footer-ok-react"]') as any

Loading…
Cancel
Save