Code Snippet:
if (createUser) await loginPage.uploadModel();
await pd.selectAndRightClick(page, locators);
// Wait for the context menu to render and appear
await page.waitForTimeout(1000);
await page.locator(homePageLocators.simulateModelMenuItem).click();
// Click the save button
await page.locator(homePageLocators.saveBtn).click();
await delay(10000);
await page.locator(bpnmmodelSimulationLog).dblclick();
await delay(15000);
console.log("DOUBLE CLICK DONE");
const newPage = await switchToDiscovererTab(page);
This thread is trying to answer question "How can I prevent a single or double click on an element from refreshing the page in JavaScript?"
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].