In a browser there's often arrow buttons that go forward and backward in history:
Can these buttons be clicked on via playwright?
There's no elements for them so I was wondering if this is possible...
await navigationObject(page).backButton.click();
CodePudding user response:
await page.goBack()
Or
await page.goForward()
You can find more info here: https://playwright.dev/docs/api/class-page#page-go-back
CodePudding user response:
Try the History API:
window.history.back()
and
window.history.forward()
See: https://developer.mozilla.org/en-US/docs/Web/API/History_API