Opentable - Macro replay won't load page

Hi,

I love this software. So far it has exceeded my expectations.

However, I’m having a problem with a particular website opentable.ca. The website is used to make dining reservations at restaurants. There is an embedded form that requires you to select a date and time of the reservation and then click to show openings.

I’ve used a macro to record the above interaction. Everything seems to work fine when recording the macro, but when I play it back, but it freezes/times out on the click function. Any idea how to overcome this?

Thanks in advance.
L

1 Like

Hi,

Can you export the macro and share(copy and paste in reply) the exported JSON ?

thanks.

Here is the export:

{
    "macros": [{
            "meta": {
                "url": "https://www.opentable.ca/r/new-fuji-north-vancouver"
            },
            "name": "Fuji",
            "spec": {
                "params": []
            },
            "steps": [["wait_doc", {
                        "frame": 0
                    }
                ], ["scroll", ["selector", {
                            "meta": {},
                            "type": "css",
                            "value": "html"
                        }
                    ], 0, 300, {
                        "frame": 0
                    }
                ], ["click", ["selector", {
                            "meta": {},
                            "type": "css",
                            "value": "[data-test='restaurant-banner']~ * div:nth-child(2) [data-test='bookable-cta-container'] [id$='label']"
                        }
                    ], {
                        "x": 73.5,
                        "y": 10.515625
                    }, {
                        "frame": 0
                    }
                ], ["click", ["selector", {
                            "meta": {},
                            "type": "css",
                            "value": "[aria-labelledby='react-day-picker-7'] tr:nth-child(5) [aria-label^='Tuesday']"
                        }
                    ], {
                        "x": 20.5,
                        "y": 24.515625
                    }, {
                        "frame": 0
                    }
                ], ["select", ["selector", {
                            "meta": {},
                            "type": "css",
                            "value": "[data-test='restaurant-banner']~ * div:nth-child(2) [data-test='bookable-cta-container'] [aria-label='Time\\ selector']"
                        }
                    ], "2000-02-01T18:00:00", {
                        "frame": 0
                    }
                ], ["click", ["selector", {
                            "meta": {},
                            "type": "css",
                            "value": "[data-test='restaurant-banner']~ * div:nth-child(2) [data-test='bookable-cta-container'] [aria-label='Find\\ a\\ time']"
                        }
                    ], {
                        "x": 154.5,
                        "y": 31.515625
                    }, {
                        "frame": 0
                    }
                ]],
            "version": 2
        }
    ]
}

The following macro should work. ( Assuming you intended to select Aug 29, 2023 as the date)

{"macros":[{"meta":{"url":"https://www.opentable.ca/r/new-fuji-north-vancouver"},"name":"Fuji","spec":{"params":[]},"steps":[["wait_doc",{"frame":0}],["scroll",["selector",{"meta":{},"type":"css","value":"html"}],0,300,{"frame":0}],["click",["selector",{"meta":{},"type":"css","value":"[data-test='restaurant-banner']~ * div:nth-child(2) [data-test='bookable-cta-container'] [id$='label']"}],{"x":73.5,"y":10.515625},{"frame":0}],["click",["selector",{"meta":{},"type":"css","value":"main > div:nth-of-type(1) > div:nth-child(2) > div:nth-child(2) tr:nth-child(5) td:nth-child(3)"}],{"x":20.5,"y":24.515625},{"frame":0}],["select",["selector",{"meta":{},"type":"css","value":"[data-test='restaurant-banner']~ * div:nth-child(2) [data-test='bookable-cta-container'] [aria-label='Time\\ selector']"}],"2000-02-01T18:00:00",{"frame":0}],["click",["selector",{"meta":{},"type":"css","value":"[data-test='restaurant-banner']~ * div:nth-child(2) [data-test='bookable-cta-container'] [aria-label='Find\\ a\\ time']"}],{"x":154.5,"y":31.515625},{"frame":0}]],"version":2}]}

Please do the following:

  1. save the above macro to a file with “.json” extension to the file name ( Eg: opentable.json).
  2. Goto Distill Web Monitor
  3. Click on “Import Macro”
  4. Import the saved json file.
  5. Replay and it should work.
  6. Save the macro.

The reason the recorded macro did not work was, the selector it generated for the click step ( clicking on the actual date) was volatile as the attribute value kept changing for one the div containers. I have manually created the selector. There is a chance that this can be volatile and break again. If it does, please respond to this same thread and I can help you by finding a better selector.

Thanks.

1 Like

Thank you! That worked!

2 Likes