Hi,
Had to break the script into two posts, limitations of the forum for new users.
Thanks
Hi,
Had to break the script into two posts, limitations of the forum for new users.
Thanks
sorry, had to break the script into two posts, some limitation of a new user
I can share the URL privately, have a case open
try {
console.log(‘trying to navigate’);
await Promise.all([ page.waitForNavigation({ timeout: 120000 }),
page.goto(‘https://URL’,{ waitUntil: ‘load’ })]);
console.log(‘Navigation to the URL was successful’);
await page.waitForLoadState(‘networkidle’); // Wait until the page is fully loaded
console.log(‘after networkidle’);
// Fill out the form fields
await page.locator('input[name="firstName"]').type('xxx');
await page.locator('input[name="lastName"]').type('xxx');
await page.locator('input[name="dateOfBirth"]').type('xxxx');
await page.locator('input[name="zip"]').type('xxx');
console.log('after all inputs');
await page.screenshot({ path: 'screenshots/after_form_filled.png' });
//const submitButton = page.locator('input[type="submit"]');
//const submitButton = page.locator('input[type="submit"]', { timeout: 60000 });
const submitButton = page.locator('//input[@type="submit" and @value="Search for savings"]', { timeout: 60000 });
if (!submitButton) {
console.error('Submit button not found');
} else {
console.log('Button found');
}
await page.waitForSelector('input[type="submit"]');
console.log('page.waitForSelector');
trying to troubleshoot an issue around this test script:
output is:
INFO[0002] Button found source=console
but around after 30s (default timeout)
ERRO[0063] Uncaught (in promise) waiting for selector “input[type=“submit”]”: timed out after 30000ms executor=constant-vus scenario=ui
not sure what I’m missing, also please share what debug options are avialble to troubleshoot browser related issues
Thanks