Skip to content

Commit

Permalink
try chrome exception
Browse files Browse the repository at this point in the history
  • Loading branch information
bunsenstraat committed Feb 11, 2025
1 parent 34530fa commit 64187da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apps/remix-ide-e2e/src/commands/switchBrowserTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion apps/remix-ide-e2e/src/helpers/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 64187da

Please sign in to comment.