aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/e2e/chrome/metamask.spec.js2
-rw-r--r--test/e2e/firefox/metamask.spec.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/test/e2e/chrome/metamask.spec.js b/test/e2e/chrome/metamask.spec.js
index d72ebe1a9..87ccf8a83 100644
--- a/test/e2e/chrome/metamask.spec.js
+++ b/test/e2e/chrome/metamask.spec.js
@@ -237,7 +237,7 @@ describe('Metamask popup page', function () {
it('confirms transaction in MetaMask popup', async function () {
const windowHandles = await driver.getAllWindowHandles()
- await driver.switchTo().window(windowHandles[2])
+ await driver.switchTo().window(windowHandles[windowHandles.length - 1])
const metamaskSubmit = await driver.findElement(By.css('#pending-tx-form > div.flex-row.flex-space-around.conf-buttons > input'))
await metamaskSubmit.click()
await delay(1000)
diff --git a/test/e2e/firefox/metamask.spec.js b/test/e2e/firefox/metamask.spec.js
index 20b8a5092..26e5dfb40 100644
--- a/test/e2e/firefox/metamask.spec.js
+++ b/test/e2e/firefox/metamask.spec.js
@@ -238,7 +238,7 @@ describe('', function () {
// There is an issue with blank confirmation window, but the button is still there and the driver is able to clicked (?.?)
it('confirms transaction in MetaMask popup', async function () {
const windowHandles = await driver.getAllWindowHandles()
- await driver.switchTo().window(windowHandles[2])
+ await driver.switchTo().window(windowHandles[windowHandles.length - 1])
const metamaskSubmit = await driver.findElement(By.css('#pending-tx-form > div.flex-row.flex-space-around.conf-buttons > input'))
await metamaskSubmit.click()
await delay(1000)