Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interacting with an element inside nested IFrames #1087

Closed
inancgumus opened this issue Oct 27, 2023 · 4 comments · Fixed by #1096
Closed

Interacting with an element inside nested IFrames #1087

inancgumus opened this issue Oct 27, 2023 · 4 comments · Fixed by #1096
Labels
bug Something isn't working next Might be eligible for the next planning (not guaranteed!) user request Requested by the community

Comments

@inancgumus
Copy link
Member

inancgumus commented Oct 27, 2023

Brief summary

Elements from the first IFrame can be retrieved but not from the IFrame inside another.

See this discussion for more information.

xk6-browser version

v1.1.0

Steps to reproduce the problem

  1. Save the following files in the test server's /tmp directory:

index.html

<body>
    <iframe id="myIframe" name="myIframe" src="iframe.html"></iframe>
    <button id="myButton" onclick="console.log('myButton pressed')">Button outside</button>
</body>

iframe.html

<body>
    <iframe id="SomeID" name="subIframe" src="iframe1.html"></iframe>
    <button id="iframeButton" onclick="console.log('iframeButton pressed')" text="IframeButton">Iframe button</button>
</body>

iframe1.html

<body>
    <button id="confirmButton" name="iframe1Button" onclick="console.log('Confirm button Pressed')"
        text="Confirm">Confirm</button>
</body>
  1. Run the test with the following script:
import { browser } from 'k6/x/browser';

export const options = {
  scenarios: {
    ui: {
      executor: 'shared-iterations',
      options: {
        browser: {
            type: 'chromium',
        },
      },
    },
  },
  thresholds: {
    checks: ["rate==1.0"]
  }
}

export default async function () {
  const page = browser.newPage();
    
    try {
      await page.goto('http://localhost:81/static/tmp/');
      const iframeHandle = page.waitForSelector('//iframe');
      const frame = iframeHandle.contentFrame();
      const button1 = frame.waitForSelector('button[text="IframeButton"]');
      await button1.click();  // this works perfectly

      const confirmFrameHandle = frame.waitForSelector('iframe[id*="SomeID"]');
      const confirmFrame = confirmFrameHandle.contentFrame();
      const button2 = confirmFrame.waitForSelector('button[text="Confirm"]');
      await button2.click(); // panics
    } finally {
        page.close();
    }
}

Expected behaviour

No panic.

Actual behaviour

An element inside nested IFrames cannot be clicked and panics with:

Stack trace
INFO[0000] "iframeButton pressed"                        browser_source=console-api source=browser
INFO[0000] {}                                            source=console
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x10 pc=0x101376910]

goroutine 375 [running]:
github.com/grafana/xk6-browser/common.(*Page).getFrameElement(0x14002424340, 0x140010bee00)
        github.com/grafana/xk6-browser@v0.10.0/common/page.go:274 +0x240
github.com/grafana/xk6-browser/common.(*Frame).FrameElement(0x140010bee00)
        github.com/grafana/xk6-browser@v0.10.0/common/frame.go:834 +0xc4
github.com/grafana/xk6-browser/common.(*ElementHandle).checkHitTargetAt(0x14000c98140, {0x102079d88?, 0x140003b4930?}, {0x404daa8000000000, 0x4043600000000000})
        github.com/grafana/xk6-browser@v0.10.0/common/element_handle.go:70 +0x4c
github.com/grafana/xk6-browser/common.(*ElementHandle).Click.(*ElementHandle).newPointerAction.func2({0x102079d88, 0x140003b4930}, 0x0?)
        github.com/grafana/xk6-browser@v0.10.0/common/element_handle.go:1449 +0x33c
github.com/grafana/xk6-browser/common.retryPointerAction({0x102079d88, 0x140003b4930}, 0x14001b092c0, 0x140005daa20)
        github.com/grafana/xk6-browser@v0.10.0/common/element_handle.go:1488 +0x3c
github.com/grafana/xk6-browser/common.(*ElementHandle).Click.(*ElementHandle).newPointerAction.func3({0x102079d88?, 0x140003b4930?}, 0x4d85?, 0x4d85?)
        github.com/grafana/xk6-browser@v0.10.0/common/element_handle.go:1476 +0x3c
created by github.com/grafana/xk6-browser/common.call in goroutine 374
        github.com/grafana/xk6-browser@v0.10.0/common/helpers.go:102 +0x134

goroutine 1 [chan receive]:
go.k6.io/k6/execution.(*Scheduler).Run(0x14001055ab0, {0x102079d18, 0x1400016eb90}, {0x102079ce0, 0x1400002f7d0}, 0x14002413260)
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/execution/scheduler.go:472 +0x970
go.k6.io/k6/cmd.(*cmdRun).run(0x140001224d0, 0x140001b5900, {0x14000176e40?, 0x1, 0x2})
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/cmd/run.go:352 +0xf30
github.com/spf13/cobra.(*Command).execute(0x140001b5900, {0x14000176e20, 0x2, 0x2})
        github.com/spf13/cobra@v1.4.0/command.go:856 +0x554
github.com/spf13/cobra.(*Command).ExecuteC(0x140002eef00)
        github.com/spf13/cobra@v1.4.0/command.go:974 +0x318
github.com/spf13/cobra.(*Command).Execute(...)
        github.com/spf13/cobra@v1.4.0/command.go:902
go.k6.io/k6/cmd.(*rootCommand).execute(0x140002a7320)
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/cmd/root.go:104 +0xe0
go.k6.io/k6/cmd.Execute()
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/cmd/root.go:137 +0x34
main.main()
        k6/main.go:12 +0x1c

goroutine 23 [select]:
io.(*pipe).read(0x140001c15c0, {0x14000580000, 0x10000, 0x100baeb54?})
        io/pipe.go:57 +0x84
io.(*PipeReader).Read(0x140002fcdf8?, {0x14000580000?, 0x140002fcdf8?, 0x100baeebc?})
        io/pipe.go:136 +0x24
bufio.(*Scanner).Scan(0x14000298f18)
        bufio/scan.go:214 +0x7c8
github.com/sirupsen/logrus.(*Entry).writerScanner(0x0?, 0x14000122580, 0x140002e3b40)
        github.com/sirupsen/logrus@v1.9.3/writer.go:86 +0xf0
created by github.com/sirupsen/logrus.(*Entry).WriterLevel in goroutine 1
        github.com/sirupsen/logrus@v1.9.3/writer.go:57 +0x3b4

goroutine 24 [chan receive]:
go.k6.io/k6/cmd.(*rootCommand).setupLoggers.func2()
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/cmd/root.go:282 +0x44
created by go.k6.io/k6/cmd.(*rootCommand).setupLoggers in goroutine 1
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/cmd/root.go:281 +0x5c4

goroutine 30 [select]:
github.com/grafana/xk6-browser/common.(*Connection).sendLoop(0x14001d94960)
        github.com/grafana/xk6-browser@v0.10.0/common/connection.go:459 +0x118
created by github.com/grafana/xk6-browser/common.NewConnection in goroutine 52
        github.com/grafana/xk6-browser@v0.10.0/common/connection.go:177 +0x318

goroutine 7 [chan receive]:
github.com/grafana/xk6-browser/browser.(*browserRegistry).handleExitEvent(0x0?, 0x0?, 0x0?)
        github.com/grafana/xk6-browser@v0.10.0/browser/registry.go:293 +0x44
created by github.com/grafana/xk6-browser/browser.newBrowserRegistry in goroutine 1
        github.com/grafana/xk6-browser@v0.10.0/browser/registry.go:225 +0x260

goroutine 8 [chan receive]:
github.com/grafana/xk6-browser/browser.(*browserRegistry).handleIterEvents(0x14001014a80, 0x0?, 0x1400282bfb0)
        github.com/grafana/xk6-browser@v0.10.0/browser/registry.go:238 +0x4c
created by github.com/grafana/xk6-browser/browser.newBrowserRegistry in goroutine 1
        github.com/grafana/xk6-browser@v0.10.0/browser/registry.go:226 +0x2c0

goroutine 49 [syscall]:
os/signal.signal_recv()
        runtime/sigqueue.go:149 +0x2c
os/signal.loop()
        os/signal/signal_unix.go:23 +0x1c
created by os/signal.Notify.func1.1 in goroutine 1
        os/signal/signal.go:151 +0x28

goroutine 29 [IO wait]:
internal/poll.runtime_pollWait(0x1483809b0, 0x72)
        runtime/netpoll.go:343 +0xa0
internal/poll.(*pollDesc).wait(0x14000d62400?, 0x140000d4000?, 0x0)
        internal/poll/fd_poll_runtime.go:84 +0x28
internal/poll.(*pollDesc).waitRead(...)
        internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Read(0x14000d62400, {0x140000d4000, 0x1000, 0x1000})
        internal/poll/fd_unix.go:164 +0x200
net.(*netFD).Read(0x14000d62400, {0x140000d4000?, 0x140002949b8?, 0x100bb7f38?})
        net/fd_posix.go:55 +0x28
net.(*conn).Read(0x1400007c030, {0x140000d4000?, 0x1400093e090?, 0x0?})
        net/net.go:179 +0x34
bufio.(*Reader).fill(0x140000aa480)
        bufio/bufio.go:113 +0xf8
bufio.(*Reader).Peek(0x140000aa480, 0x2)
        bufio/bufio.go:151 +0x60
github.com/gorilla/websocket.(*Conn).read(0x14001c84840, 0x14001a1b1e0?)
        github.com/gorilla/websocket@v1.5.0/conn.go:371 +0x28
github.com/gorilla/websocket.(*Conn).advanceFrame(0x14001c84840)
        github.com/gorilla/websocket@v1.5.0/conn.go:809 +0x60
github.com/gorilla/websocket.(*Conn).NextReader(0x14001c84840)
        github.com/gorilla/websocket@v1.5.0/conn.go:1009 +0x8c
github.com/gorilla/websocket.(*Conn).ReadMessage(0x14000294e98?)
        github.com/gorilla/websocket@v1.5.0/conn.go:1093 +0x1c
github.com/grafana/xk6-browser/common.(*Connection).recvLoop(0x14001d94960)
        github.com/grafana/xk6-browser@v0.10.0/common/connection.go:305 +0x90
created by github.com/grafana/xk6-browser/common.NewConnection in goroutine 52
        github.com/grafana/xk6-browser@v0.10.0/common/connection.go:176 +0x2d8

goroutine 11 [select]:
go.k6.io/k6/output.(*PeriodicFlusher).run(0x1400283a750)
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/output/helpers.go:67 +0xac
created by go.k6.io/k6/output.NewPeriodicFlusher in goroutine 1
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/output/helpers.go:102 +0x124

goroutine 12 [select]:
go.k6.io/k6/output.(*Manager).Start.func2()
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/output/manager.go:63 +0x12c
created by go.k6.io/k6/output.(*Manager).Start in goroutine 1
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/output/manager.go:56 +0x13c

goroutine 13 [select]:
go.k6.io/k6/metrics/engine.(*MetricsEngine).StartThresholdCalculations.func1()
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/metrics/engine/engine.go:179 +0xe4
created by go.k6.io/k6/metrics/engine.(*MetricsEngine).StartThresholdCalculations in goroutine 1
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/metrics/engine/engine.go:173 +0xd8

goroutine 14 [IO wait]:
internal/poll.runtime_pollWait(0x1483807c0, 0x72)
        runtime/netpoll.go:343 +0xa0
internal/poll.(*pollDesc).wait(0x14000e72000?, 0x101f2dfa0?, 0x0)
        internal/poll/fd_poll_runtime.go:84 +0x28
internal/poll.(*pollDesc).waitRead(...)
        internal/poll/fd_poll_runtime.go:89
internal/poll.(*FD).Accept(0x14000e72000)
        internal/poll/fd_unix.go:611 +0x250
net.(*netFD).accept(0x14000e72000)
        net/fd_unix.go:172 +0x28
net.(*TCPListener).accept(0x14001a42060)
        net/tcpsock_posix.go:152 +0x28
net.(*TCPListener).Accept(0x14001a42060)
        net/tcpsock.go:315 +0x2c
net/http.(*Server).Serve(0x14001c87950, {0x102077840, 0x14001a42060})
        net/http/server.go:3056 +0x2b8
net/http.(*Server).ListenAndServe(0x14001c87950)
        net/http/server.go:2985 +0x84
go.k6.io/k6/cmd.(*cmdRun).run.func11()
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/cmd/run.go:277 +0xfc
created by go.k6.io/k6/cmd.(*cmdRun).run in goroutine 1
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/cmd/run.go:274 +0xbf4

goroutine 15 [chan receive]:
go.k6.io/k6/cmd.(*cmdRun).run.func12()
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/cmd/run.go:289 +0x90
created by go.k6.io/k6/cmd.(*cmdRun).run in goroutine 1
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/cmd/run.go:287 +0xccc

goroutine 65 [select]:
go.k6.io/k6/cmd.handleTestAbortSignals.func1()
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/cmd/common.go:96 +0x7c
created by go.k6.io/k6/cmd.handleTestAbortSignals in goroutine 1
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/cmd/common.go:95 +0x184

goroutine 66 [select]:
go.k6.io/k6/execution.(*Scheduler).emitVUsAndVUsMax.func2()
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/execution/scheduler.go:237 +0xd8
created by go.k6.io/k6/execution.(*Scheduler).emitVUsAndVUsMax in goroutine 1
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/execution/scheduler.go:229 +0x1ec

goroutine 44 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 86 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 117 [select]:
github.com/grafana/xk6-browser/common.(*BaseEventEmitter).syncAll(0x14001015380, {0x102079d18, 0x140009a7590})
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:130 +0x90
created by github.com/grafana/xk6-browser/common.NewBaseEventEmitter in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:120 +0x14c

goroutine 53 [semacquire]:
sync.runtime_Semacquire(0x14000fb1688?)
        runtime/sema.go:62 +0x2c
sync.(*WaitGroup).Wait(0x14000b88c90)
        sync/waitgroup.go:116 +0x74
go.k6.io/k6/lib/executor.SharedIterations.Run.func4()
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/lib/executor/shared_iterations.go:218 +0x54
go.k6.io/k6/lib/executor.SharedIterations.Run({0x14001014f80, {{{0x140005bdca8, 0x2}, {0x14001c3fdb8, 0x11}, {0x0, 0x0}, {0x6fc23ac00, 0x0}, 0x0, ...}, ...}, ...}, ...)
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/lib/executor/shared_iterations.go:274 +0xa64
go.k6.io/k6/execution.(*Scheduler).runExecutor(0x14001055ab0, {0x102079d18, 0x14000b7ef50}, 0x140009a7130?, 0x0?, {0x10207b500, 0x14002682c60})
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/execution/scheduler.go:366 +0x3fc
created by go.k6.io/k6/execution.(*Scheduler).Run in goroutine 1
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/execution/scheduler.go:466 +0x81c

goroutine 80 [select]:
github.com/grafana/xk6-browser/common.(*BaseEventEmitter).syncAll(0x140010152c0, {0x102079d18, 0x140009a7590})
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:130 +0x90
created by github.com/grafana/xk6-browser/common.NewBaseEventEmitter in goroutine 29
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:120 +0x14c

goroutine 113 [select]:
github.com/grafana/xk6-browser/common.(*Session).readLoop(0x1400260f900)
        github.com/grafana/xk6-browser@v0.10.0/common/session.go:87 +0x6c
created by github.com/grafana/xk6-browser/common.NewSession in goroutine 29
        github.com/grafana/xk6-browser@v0.10.0/common/session.go:51 +0x258

goroutine 118 [select]:
github.com/grafana/xk6-browser/common.(*NetworkManager).handleEvents(0x14002468e00, 0x1400243af00)
        github.com/grafana/xk6-browser@v0.10.0/common/network_manager.go:308 +0x78
github.com/grafana/xk6-browser/common.(*NetworkManager).initEvents.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/network_manager.go:302 +0x38
created by github.com/grafana/xk6-browser/common.(*NetworkManager).initEvents in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/network_manager.go:301 +0x154

goroutine 41 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 28 [select]:
github.com/grafana/xk6-browser/common.(*BaseEventEmitter).syncAll(0x1400101e080, {0x102079d18, 0x140009a7590})
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:130 +0x90
created by github.com/grafana/xk6-browser/common.NewBaseEventEmitter in goroutine 52
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:120 +0x14c

goroutine 116 [select]:
github.com/grafana/xk6-browser/common.(*BaseEventEmitter).syncAll(0x14001015300, {0x102079d18, 0x140009a7590})
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:130 +0x90
created by github.com/grafana/xk6-browser/common.NewBaseEventEmitter in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:120 +0x14c

goroutine 88 [select]:
github.com/grafana/xk6-browser/common.(*FrameSession).initEvents.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/frame_session.go:218 +0x1cc
created by github.com/grafana/xk6-browser/common.(*FrameSession).initEvents in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/frame_session.go:211 +0x180

goroutine 51 [chan receive]:
github.com/grafana/xk6-browser/browser.(*browserRegistry).handleExitEvent(0x0?, 0x100c10c94?, 0x10208b108?)
        github.com/grafana/xk6-browser@v0.10.0/browser/registry.go:293 +0x44
created by github.com/grafana/xk6-browser/browser.newBrowserRegistry in goroutine 70
        github.com/grafana/xk6-browser@v0.10.0/browser/registry.go:225 +0x260

goroutine 52 [chan receive]:
github.com/grafana/xk6-browser/browser.(*browserRegistry).handleIterEvents(0x14001036b40, 0xc98b?, 0x14000fbb2f0)
        github.com/grafana/xk6-browser@v0.10.0/browser/registry.go:238 +0x4c
created by github.com/grafana/xk6-browser/browser.newBrowserRegistry in goroutine 70
        github.com/grafana/xk6-browser@v0.10.0/browser/registry.go:226 +0x2c0

goroutine 54 [chan receive]:
go.k6.io/k6/lib/executor.trackProgress({0x102079d18, 0x14000b7ef50}, {0x102079ce0, 0x14000fdeab0}, {0x102079d88, 0x14000f850a0}, {0x10207b500, 0x14001c43810}, 0x14001b4aa80)
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/lib/executor/helpers.go:164 +0x80
go.k6.io/k6/lib/executor.SharedIterations.Run.func3()
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/lib/executor/shared_iterations.go:209 +0x4c
created by go.k6.io/k6/lib/executor.SharedIterations.Run in goroutine 53
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/lib/executor/shared_iterations.go:208 +0x70c

goroutine 55 [chan receive]:
go.k6.io/k6/js/eventloop.(*EventLoop).Start(0x14000b7e050, 0x140003920c0)
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/js/eventloop/eventloop.go:172 +0xd8
go.k6.io/k6/js.(*VU).runFn.func2()
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/js/runner.go:847 +0xe0
go.k6.io/k6/js/common.RunWithPanicCatching({0x10208b108?, 0x140002e0700?}, 0x14000299a48?, 0x100bbbed0?)
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/js/common/util.go:86 +0x74
go.k6.io/k6/js.(*VU).runFn(0x1400231e280, {0x102079d18, 0x14000b7f2c0}, 0x20?, 0x1400000c798, 0x14001e635a0, {0x14001e70000, 0x1, 0x1})
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/js/runner.go:846 +0x1d8
go.k6.io/k6/js.(*ActiveVU).RunOnce(0x14001036e80)
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/js/runner.go:788 +0x3ec
go.k6.io/k6/lib/executor.SharedIterations.Run.getIterationRunner.func8({0x102079ce0, 0x14000fdeab0}, {0x102069078?, 0x14001036e80?})
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/lib/executor/helpers.go:81 +0x44
go.k6.io/k6/lib/executor.SharedIterations.Run.func6({0x102073920, 0x1400231e280})
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/lib/executor/shared_iterations.go:259 +0x2ec
created by go.k6.io/k6/lib/executor.SharedIterations.Run in goroutine 53
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/lib/executor/shared_iterations.go:271 +0x93c

goroutine 56 [chan receive]:
go.k6.io/k6/js.(*VU).Activate.func5()
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/js/runner.go:714 +0x48
created by go.k6.io/k6/js.(*VU).Activate in goroutine 55
        go.k6.io/k6@v0.45.1-0.20230804150043-5b5c5ccbb869/js/runner.go:712 +0x544

goroutine 57 [select]:
os/exec.(*Cmd).watchCtx(0x14001a22c60, 0x14000fbe840)
        os/exec/exec.go:757 +0x7c
created by os/exec.(*Cmd).Start in goroutine 52
        os/exec/exec.go:743 +0x788

goroutine 58 [syscall]:
syscall.syscall6(0xc9d2?, 0xeeae?, 0xeeaf?, 0xc9d2?, 0xc9d5?, 0x10001c9d6?, 0xc9d6?)
        runtime/sys_darwin.go:45 +0x68
syscall.wait4(0x14000629e28?, 0x100c88668?, 0x90?, 0x101fe9760?)
        syscall/zsyscall_darwin_arm64.go:43 +0x4c
syscall.Wait4(0xc9d4?, 0x14000629e64, 0xeeb3?, 0xc9d4?)
        syscall/syscall_bsd.go:144 +0x28
os.(*Process).wait(0x14000fe2bd0)
        os/exec_unix.go:43 +0x80
os.(*Process).Wait(...)
        os/exec.go:134
os/exec.(*Cmd).Wait(0x14001a22c60)
        os/exec/exec.go:890 +0x38
github.com/grafana/xk6-browser/common.execute.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/browser_process.go:192 +0x70
created by github.com/grafana/xk6-browser/common.execute in goroutine 52
        github.com/grafana/xk6-browser@v0.10.0/common/browser_process.go:183 +0x33c

goroutine 78 [select]:
github.com/grafana/xk6-browser/common.(*BrowserProcess).handleClose(0x140021f0d20, {0x102079d18?, 0x14000b7f3b0?})
        github.com/grafana/xk6-browser@v0.10.0/common/browser_process.go:93 +0x68
created by github.com/grafana/xk6-browser/common.NewLocalBrowserProcess in goroutine 52
        github.com/grafana/xk6-browser@v0.10.0/common/browser_process.go:64 +0x258

goroutine 31 [select]:
github.com/grafana/xk6-browser/common.(*BaseEventEmitter).syncAll(0x1400101e0c0, {0x102079d18, 0x140009a7590})
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:130 +0x90
created by github.com/grafana/xk6-browser/common.NewBaseEventEmitter in goroutine 52
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:120 +0x14c

goroutine 32 [select]:
github.com/grafana/xk6-browser/common.(*Browser).initEvents.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/browser.go:192 +0xcc
created by github.com/grafana/xk6-browser/common.(*Browser).initEvents in goroutine 52
        github.com/grafana/xk6-browser@v0.10.0/common/browser.go:183 +0x174

goroutine 100 [select]:
github.com/grafana/xk6-browser/common.(*BaseEventEmitter).syncAll(0x1400104a100, {0x102079d18, 0x140009a7590})
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:130 +0x90
created by github.com/grafana/xk6-browser/common.NewBaseEventEmitter in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:120 +0x14c

goroutine 61 [select]:
github.com/grafana/xk6-browser/common.(*BaseEventEmitter).syncAll(0x14001036fc0, {0x102079d18, 0x140009a7590})
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:130 +0x90
created by github.com/grafana/xk6-browser/common.NewBaseEventEmitter in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:120 +0x14c

goroutine 282 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 124 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 120 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 127 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 90 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 93 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 132 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 63 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 107 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 306 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 137 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 134 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 149 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 369 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 39 [select]:
github.com/grafana/xk6-browser/common.(*Page).initEvents.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/page.go:198 +0x168
created by github.com/grafana/xk6-browser/common.(*Page).initEvents in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/page.go:183 +0x14c

goroutine 334 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 162 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 165 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 168 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 171 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 174 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 332 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 222
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 261 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 118
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 326 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 222
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 159 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 181 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 184 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 187 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 190 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 32
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 228 [select]:
github.com/grafana/xk6-browser/common.(*BaseEventEmitter).syncAll(0x14001a282c0, {0x102079d18, 0x140009a7590})
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:130 +0x90
created by github.com/grafana/xk6-browser/common.NewBaseEventEmitter in goroutine 88
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:120 +0x14c

goroutine 194 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 110
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 329 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 222
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 202 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 118
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 248 [select]:
github.com/grafana/xk6-browser/common.(*BaseEventEmitter).syncAll(0x14001015b40, {0x102079d18, 0x140009a7590})
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:130 +0x90
created by github.com/grafana/xk6-browser/common.NewBaseEventEmitter in goroutine 88
        github.com/grafana/xk6-browser@v0.10.0/common/event_emitter.go:120 +0x14c

goroutine 140 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 118
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 279 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 384 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 375
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 374 [select]:
github.com/grafana/xk6-browser/common.call({0x102079d18, 0x140009a7590}, 0x14002580408, 0x6fc23ac00)
        github.com/grafana/xk6-browser@v0.10.0/common/helpers.go:104 +0x198
github.com/grafana/xk6-browser/common.(*ElementHandle).Click(0x14000c98140, {0x0, 0x0})
        github.com/grafana/xk6-browser@v0.10.0/common/element_handle.go:755 +0x2ac
github.com/grafana/xk6-browser/browser.mapElementHandle.func1.1()
        github.com/grafana/xk6-browser@v0.10.0/browser/mapping.go:204 +0x30
github.com/grafana/xk6-browser/k6ext.promise.func1()
        github.com/grafana/xk6-browser@v0.10.0/k6ext/promise.go:41 +0x5c
created by github.com/grafana/xk6-browser/k6ext.promise in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/k6ext/promise.go:40 +0xdc

goroutine 272 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 291 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 294 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 297 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 309 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 312 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 222
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 318 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 222
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 337 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 222
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 340 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 222
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 343 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 222
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 346 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 222
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 349 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 222
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 352 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 222
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 372 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 55
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 377 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 375
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 406 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 375
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 403 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 375
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 409 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 375
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 412 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 375
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0

goroutine 415 [select]:
github.com/grafana/xk6-browser/common.contextWithDoneChan.func1()
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:61 +0x78
created by github.com/grafana/xk6-browser/common.contextWithDoneChan in goroutine 375
        github.com/grafana/xk6-browser@v0.10.0/common/context.go:59 +0xb0
2023/10/27 16:24:45 [ERROR] exit status 2
@inancgumus inancgumus added the bug Something isn't working label Oct 27, 2023
@bandorko
Copy link
Contributor

bandorko commented Oct 27, 2023

Hi!

There is an another issue (maybe the same cause). If you create an iframe2.html

<body>
  Whatever
</body>

and insert a second iframe into the iframe.html

<body>
    <iframe id="SomeID2" name="subIframe2" src="iframe2.html"></iframe>
    <iframe id="SomeID" name="subIframe" src="iframe1.html"></iframe>
    <button id="iframeButton" onclick="console.log('iframeButton pressed')" text="IframeButton">Iframe button</button>
</body>

then const button2 = confirmFrame.waitForSelector('button[text="Confirm"]'); not even finds the button. (timeout)

Note: If you place SomeID2 iframe below SomeID iframe, then the result is the same as described in the ticket description. (panic)

Edit:
this has nothing to do with the issue. It happens, because the selector (iframe[id*="SomeID"]) matches both IFrame (SomeID2 and SomeID), but only returns the first one, which doesn't contains the Confirm button.

@inancgumus
Copy link
Member Author

Thanks, @bandorko 🙇 Good to know! This info will be valuable when we're tackling this issue.

@ahlstro
Copy link

ahlstro commented Nov 6, 2023

Have the same problem. Does bugfixes like these have an ETA? :)

@inancgumus inancgumus added next Might be eligible for the next planning (not guaranteed!) user request Requested by the community labels Nov 6, 2023
@bandorko
Copy link
Contributor

bandorko commented Nov 9, 2023

I think I fixed this issue, but please review it.

@inancgumus inancgumus changed the title Clicking an element inside nested IFrames Interacting with an element inside nested IFrames Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next Might be eligible for the next planning (not guaranteed!) user request Requested by the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants