Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

couldn't locate on next button and click in this website, what should I do? #33058

Open
1 task done
cobaltautomationdev opened this issue Oct 11, 2024 · 5 comments
Open
1 task done

Comments

@cobaltautomationdev
Copy link

Please do not submit this issue.

  • I understand
@cobaltautomationdev cobaltautomationdev changed the title [Please read the message below] couldn't locate on next button and click in this website, what should I do? Oct 11, 2024
@cobaltautomationdev
Copy link
Author

https://commerce.spscommerce.com/fulfillment/transactions/list/ , can any guys try to use playwright to locate next button after input email address.

async def run(playwright: Playwright) -> None:
      browser = await playwright.chromium.launch(headless=False)
      context = await browser.new_context()
      page = await context.new_page()
      await page.goto("https://commerce.spscommerce.com/fulfillment/transactions/list/")
   
      await page.get_by_label("Email Address").fill("[email protected]")
      await page.get_by_label("Remember Me").check()
      await page.get_by_role("button", name="Next").click() 

@johnnygerard
Copy link

Playwright has features to help locate elements on the page (see Generating locators).

@yonglee7015
Copy link

Playwright has features to help locate elements on the page (see Generating locators).

Thank you for your response. I understand that the method should help me locate elements, as in my code: await page.get_by_role("button", name="Next").click(). However, it doesn't seem to work. You can try reproducing the issue with this code.

@johnnygerard
Copy link

It's hard to help you without knowing what your issue is.

Do you have an error message?

@johnnygerard
Copy link

I just realized that you used the "Questions and Help 💬" template to submit an issue. You are not supposed to do that. Also, using multiple accounts is also not ideal for communication.

Good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants