INNER CODE UNIT · TypeScript

getPage

hyperbrowserai/HyperAgent · src/agent/index.ts:527

    const getPage = () =>
      typeof pageOrGetter === "function" ? pageOrGetter() : pageOrGetter;

    const stepsResult: ActionCacheReplayResult["steps"] = [];
    let replayStatus: TaskStatus.COMPLETED | TaskStatus.FAILED =
      TaskStatus.COMPLETED;

    /**
     * Type-safe dispatch for HyperPage perform* methods.
     * Explicitly routes to the correct method with proper typing.
     *
     * Methods that require a value argument (second param): type, fill, press, selectOptionFromDropdown, scrollToPercentage
     * Methods with only xpath and options: click, hover, check, uncheck, scrollToElement, nextChunk, prevChunk
     */
    const dispatchPerformHelper = (
      hp: HyperPage,
      method: string,
      xpath: string,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…