Skip to content
This repository has been archived by the owner on Jan 30, 2025. It is now read-only.

panic on getting title #1539

Closed
mstoykov opened this issue Nov 15, 2024 · 1 comment
Closed

panic on getting title #1539

mstoykov opened this issue Nov 15, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mstoykov
Copy link
Contributor

Brief summary

panic: interface conversion: interface {} is nil, not string

goroutine 4505318 [running]:
github.com/grafana/xk6-browser/common.(*Frame).Title(0xc048f0e540)
github.com/grafana/xk6-browser@v1.9.1/common/frame.go:1748 +0x132
github.com/grafana/xk6-browser/browser.mapFrame.func34.1()
github.com/grafana/xk6-browser@v1.9.1/browser/frame_mapping.go:233 +0x17
github.com/grafana/xk6-browser/k6ext.promise.func1()
github.com/grafana/xk6-browser@v1.9.1/k6ext/promise.go:24 +0x2c
created by github.com/grafana/xk6-browser/k6ext.promise in goroutine 409
github.com/grafana/xk6-browser@v1.9.1/k6ext/promise.go:23 +0x9a

xk6-browser version

v1.9.1

OS

linux

Chrome version

Docker version and image (if applicable)

No response

Steps to reproduce the problem

import { browser } from "k6/browser";

export const options = {
	scenarios: {
		ui: {
			executor: "shared-iterations",
			options: {
				browser: {
					type: "chromium",
				},
			},
		},
	}
};

export default async function() {
	const context = await browser.newContext();
	const page = await context.newPage();
	page.frames()[0].title()
	console.log("here", page.mainFrame.title());
}

Seems to make it break in the same way - all lines seem to be improtant

Expected behaviour

no panic

Actual behaviour

panic

@mstoykov mstoykov added the bug Something isn't working label Nov 15, 2024
@mstoykov
Copy link
Contributor Author

This was fixed in 77a5872 but there was apperantly no issue that I can find.

@ankur22 ankur22 mentioned this issue Nov 15, 2024
3 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant