← 返回
未分类 中文

Opentable Booking

Book restaurant tables on OpenTable via the browser tool. Handles hidden time slots and terms checkboxes with JS evaluate fallbacks. Works with a logged-in s...
通过浏览器工具在OpenTable上预订餐桌。处理隐藏的时间槽和条款复选框,使用JS评估回退。需要已登录会话。
eeshita-pande eeshita-pande 来源
未分类 clawhub v1.0.1 1 版本 99850.5 Key: 无需
★ 1
Stars
📥 648
下载
💾 0
安装
1
版本
#latest

概述

OpenTable Booking (Browser Tool)

Use the OpenClaw browser tool to book restaurants via OpenTable.

> Why this skill exists: OpenTable's widget hides critical UI elements

> (time-slot links, terms checkboxes) from the accessibility/aria tree.

> This skill encodes the JS evaluation patterns that reliably find them.

> See browser-snippets.md for the full snippet reference.

When to Use

  • Any request to book or reserve a restaurant table on OpenTable.
  • Works globally — opentable.com, opentable.co.uk, opentable.de, and all other OpenTable domains.

Do not use for SevenRooms, Resy, Tock, TheFork, or other booking platforms.

Prerequisites

  1. OpenClaw browser is running with profile="openclaw" (headed, not headless — Cloudflare blocks headless on OpenTable).
  2. User is already logged into OpenTable (session cookie present).
  3. A payment card is on file in the OpenTable account (auto-loaded at checkout).

First-time setup: If not yet logged in, navigate to the OpenTable sign-in page manually, authenticate via email + verification code, and ensure a card is saved. This only needs to be done once — the session persists.

Core Loop (MANDATORY)

  1. browser.navigate to target URL.
  2. browser.snapshot (interactive).
  3. Decide action using refs from snapshot.
  4. browser.act (click/fill).
  5. Re-snapshot after every significant action.

Never guess selectors. Never reuse old refs after navigation.

Booking Flow

1) Parse request

Extract from the user's message:

  • Restaurant name (required).
  • Date (required).
  • Time (default: 20:30).
  • Party size (default: 2).
  • Location (default: London).
  • OpenTable domain (default: opentable.co.uk — use opentable.com for US, opentable.de for Germany, etc.).
  • Seating preference (default: standard).
  • Special request (default: none).

2) Navigate to restaurant page

Use slug URL:

https://www.{domain}/r/{restaurant-slug}-{location}?covers={partySize}&dateTime={YYYY-MM-DD}T{HH:MM}

If you don't know the slug, use search:

https://www.{domain}/s?covers={party_size}&dateTime={date}T{time}&term={restaurant}+{location}

Where {domain} is the appropriate OpenTable domain (e.g. opentable.co.uk, opentable.com).

3) Dismiss cookie banner

If a cookie banner appears, click the Accept/Close button by ref. Re-snapshot.

browser.act(click ref for "Accept" / "Accept All" / close button)
browser.snapshot(interactive=true)

4) Confirm/Set date, time, party size

Check the widget bar at the top of the restaurant page. If the pre-filled values don't match the request, click the relevant widget and update:

  • Date picker: click the date field ref → navigate to correct month → click day.
  • Time picker: click time dropdown ref → select correct time.
  • Covers: click covers dropdown ref → select number.

Re-snapshot after each change. Then click "Find a Table" / "Search" if needed.

5) Select time slot (⚠️ JS required)

The time-slot buttons are NOT reliably in the aria tree. Run this JS evaluation to find them:

(() => {
  const links = [...document.querySelectorAll('a')];
  const timeSlots = links.filter(a => {
    const text = a.textContent.trim();
    return /^\d{1,2}:\d{2}$/.test(text) && a.offsetParent !== null;
  });
  return timeSlots.map(a => ({
    time: a.textContent.trim(),
    id: a.id || '',
    href: a.href || '',
    rect: a.getBoundingClientRect().toJSON()
  }));
})()

This returns visible elements whose text matches HH:MM.

To click the desired slot:

(() => {
  const links = [...document.querySelectorAll('a')];
  const target = links.find(a =>
    a.textContent.trim() === '{TARGET_TIME}' && a.offsetParent !== null
  );
  if (target) { target.click(); return 'clicked ' + target.textContent.trim(); }
  return 'not found';
})()

Replace {TARGET_TIME} with the exact HH:MM string (e.g. "20:30").

If the exact time isn't available, pick the nearest available slot. Re-snapshot after clicking.

6) Choose booking type

If options like Standard reservation vs tasting menus appear, select Standard unless user specified otherwise. Click its Select button by ref. Re-snapshot.

7) Verify pre-filled details

Because we're logged in, OpenTable should pre-fill:

Verify these are present in the snapshot. If guest details are empty, fill them in step 8. If no card on file is shown, stop and inform the user — they need to add a card to their OpenTable account before this skill can complete a booking.

8) Manually fill guest details ONLY if they aren't pre-filled

Use browser.act fill on the fields (from refs):

Re-snapshot.

9) Accept terms checkbox (⚠️ JS required)

The terms checkbox is often NOT in the aria tree. Find and check it via JS:

(() => {
  const checkboxes = [...document.querySelectorAll('input[type="checkbox"]')];
  const terms = checkboxes.find(cb => {
    const label = cb.closest('label') || document.querySelector('label[for="' + cb.id + '"]');
    return label && /terms|conditions|policy|agree/i.test(label.textContent);
  });
  if (terms && !terms.checked) {
    terms.click();
    return 'checked terms';
  }
  if (terms && terms.checked) return 'already checked';
  return 'not found';
})()

Re-snapshot to verify it's checked.

10) Complete booking

Find and click the "Complete reservation" / "Confirm" button by ref.

browser.act(click ref={confirm_button_ref})

Re-snapshot.

11) Handle 3DS

If a 3DS authentication iframe or redirect appears:

12) Report result

Return confirmation number and summary:

Error Handling

Tooling Constraints

External Endpoints

Security & Privacy

Trust Statement

By using this skill, your browser navigates to OpenTable and interacts with the page on your behalf. No data is sent to any third party. All booking actions happen within your existing authenticated OpenTable session.

版本历史

共 1 个版本

  • v1.0.1 当前
    2026-03-30 15:27 安全 安全

🔗 相关推荐

ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 838 📥 315,517
ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,110 📥 832,766
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,398 📥 323,185