My Playwright python script doesn't find input form fields

Discussão em 'Angular' iniciado por user1867071, Agosto 30, 2025.

  1. user1867071

    user1867071 Guest

    So I want to automate adding many team players on teamstats.net, I wrote a script to do this with Playwright as the players are much, the issues is that the script don't seem to find the input fields like the first name, last name and email address I have tried everything but to no avail, teamstats.net uses Angular for their frontend so their input fields are very tricky. Below is the code to wait for the inputs to become visible and fill it, please help me guys

    # Wait for the input fields to become visible and fill them
    first_name_input = page.locator('div.ts-text-input input').first
    last_name_input = page.locator('div.ts-text-input input').nth(1)
    email_input = page.locator('div.ts-text-input input').nth(2)

    first_name_input.wait_for(state="visible", timeout=10000)
    first_name_input.fill(first)

    last_name_input.wait_for(state="visible", timeout=10000)
    last_name_input.fill(last)

    email_input.wait_for(state="visible", timeout=10000)
    email_input.fill(email)

    Continue reading...

Compartilhe esta Página