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

Page.goto() Unable to load page #120

@MissHajar

Description

@MissHajar

I'm trying to open a page with generated URL and page.goto() method. Whenever the browser open and the page begin to load, it crashes and I get the error:

panic: unable to parse remote object value: cannot extract value when remote object ID is given
running (0m02.8s), 1/1 VUs, 0 complete and 0 interrupted iterations
goroutine 90 [running]:--------------------------] 1/1 VUs  02.8s/45.0s
go.k6.io/k6/js/common.Throw(...)
        go.k6.io/[email protected]/js/common/util.go:36
github.com/grafana/xk6-browser/common.(*FrameSession).onConsoleAPICalled(0xc00207c300, 0xc0034301e0)
        github.com/grafana/[email protected]/common/frame_session.go:419 +0x54e
github.com/grafana/xk6-browser/common.(*FrameSession).initEvents.func1()
        github.com/grafana/[email protected]/common/frame_session.go:208 +0x357
created by github.com/grafana/xk6-browser/common.(*FrameSession).initEvents
        github.com/grafana/[email protected]/common/frame_session.go:181 +0xe7

I'm running on Windows and here's my script (sample URL -> won't work)

import { sleep, check, group } from "k6";
import http from "k6/http";

import launcher from "k6/x/browser";

let PaymentPageUrl = "https://www.example.com/actor/name?1565621654&data=ksmancoajd 

export default function main() {
  browser = launcher.launch("chromium", {
    args: [],
    debug: true,
    devtools: false,
    env: {},
    executablePath: null,
    headless: false,
    ignoreDefaultArgs: [],
    proxy: {},
    slowMo: "1000ms",
    timeout: "60s",
  });

  context = browser.newContext({
    ignoreHTTPSErrors: true,
    JavaScriptEnabled: true,
  });

  page = context.newPage();
  group("Navigate to Url", () => {
    try {
      page.goto(PaymentPageUrl, {
        waitUntil: "load",
      });
      console.log("=== Goto passed");
      //page.once('load', () => console.log('Page loaded!'));
    } catch (error) {
      console.log("Goto Error ==>", error);
    }
    try {
      frame = page.mainFrame();
      console.log("=== Frame set");
    } catch (error) {
      console.log("Frame Error ==>", error);
    }
    sleep(10);
    frame.waitForSelector('iframe[id="complpay-content-iframe"]');
  });
  sleep(10);
}

I manage to load as a test a simple documentation page and click on a link.
But for my "complex" page, I've tried a lot of things but without success.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions