My other next thought is maybe inspect the page network requests? Making sure they line up with what
My other next thought is maybe inspect the page network requests? Making sure they line up with what I see in devtools in a normal browser?
__doCallBack ? Or clicking the submit button?theForm isn't defined in there, it's defined just outside by__doPostBack and fill in the eventTarget and any eventArgs. These then get filled in as those hidden __EVENTTARGET and __EVENTARGUMENT input fields defined above. Those get submitted to the server and that's how it knows what button you pressed so it can run the appropriate event handler code on the server, then send you back a new page render.await everywhere it should be as well. You never know what might be checking for something without waiting for the postback to finish.Dockerfile browser-service.yml routes.js express, not shown)session-controller.js browser-controller.js wallaby-esm module, but not entirely sure. Here's the package versions we're using:
page.on("console", (log) => logs.push(log.text()));walkme.com scripts in the headworkers.api.error.no_access_to_browser_worker, so I'd assume so!Sorry, you have been blocked error page__doCallBackfunction __doPostBack(eventTarget, eventArgument) {
if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
}
}theFormvar theForm = document.forms['form1'];__doPostBack__EVENTTARGET__EVENTARGUMENTpageNumber += 1;
await page.waitForFunction(() => typeof window.__doPostBack === 'function', { timeout: 30000, polling: 100 });
await Promise.all([
page.waitForNavigation({ waitUntil: 'networkidle0' }),
page.evaluate(`__doPostBack('gridItems','Page$${pageNumber}')`),
]);browser-service.ymlroutes.jsexpresssession-controller.jsbrowser-controller.jswallaby-esm "puppeteer": "^17.1.3",
"puppeteer-extra": "^3.3.6",
"puppeteer-extra-plugin-stealth": "^2.11.2",{
"logs": [
"WalkMe: Incompatible browser.",
"JSHandle@object"
]
}page.on("console", (log) => logs.push(log.text()));walkme.comawait page.setCacheEnabled(false);
await page.setViewport({ width: 1920, height: 1080 })
await page.setUserAgent('Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36');
await page.setJavaScriptEnabled(true);
await page.evaluateOnNewDocument(() => {
// Pass the Webdriver Test.
Object.defineProperty(navigator, 'webdriver', {
get: () => false,
});
});workers.api.error.no_access_to_browser_workerSorry, you have been blockedconst [page] = await browser.pages();
// Hijack browser navigation and instead send requests.
await page.setRequestInterception(true);
page.once('request', async (interceptedRequest) => {
const headers = {};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
request.headers.forEach((v, k) => ((headers as any)[k] = v));
interceptedRequest.continue({
method: request.method,
postData: requestBody,
headers,
});
await page.setRequestInterception(false);
});
// Trigger the requests
const response = await page.goto(request.url);