try chrome exception

pull/5756/head
bunsenstraat 5 days ago committed by bunsenstraat
parent b4352e32fe
commit e87c4c2dba
  1. 4
      apps/remix-ide-e2e/src/commands/switchBrowserTab.ts
  2. 2
      apps/remix-ide-e2e/src/helpers/init.ts

@ -8,9 +8,13 @@ import EventEmitter from 'events'
class SwitchBrowserTab extends EventEmitter {
command(this: NightwatchBrowser, index: number): NightwatchBrowser {
this.api.perform((browser: NightwatchAPI, done) => {
const runtimeBrowser = browser.options.desiredCapabilities.browserName
browser.windowHandles((result) => {
console.log('switching to window', result)
if (Array.isArray(result.value)) {
if(runtimeBrowser === 'chrome') {
index = index + 1
}
browser.switchWindow(result.value[index] || result.value[0])
}
done()

@ -13,7 +13,7 @@ export default function (browser: NightwatchBrowser, callback: VoidFunction, url
browser
.url(url || 'http://127.0.0.1:8080')
.pause(5000)
.switchBrowserTab(1)
.switchBrowserTab(0)
.hidePopupPanel()
.perform((done) => {
if (!loadPlugin) return done()

Loading…
Cancel
Save