0

When I try to use the .click() method of a locator I get this error back:

E       playwright._impl._api_types.TimeoutError: Timeout 5000ms exceeded.
E       =========================== logs ===========================
E       waiting for selector "[id="new-company"]"
E         selector resolved to visible <cye-button iconsize="15" id="new-company" _nghost-lfr-c38="…>…</cye-button>
E       attempting click action
E         waiting for element to be visible, enabled and stable
E         element is visible, enabled and stable
E         scrolling into view if needed
E         done scrolling
E         performing click action
E       ============================================================

I use .wait_for_load_state('networkidle') before this line to make sure the page has finished loading, so I don't understand the cause

  • 1
    are you sure the element is clickable? Try to raise the timeout by passing `timeout=xxx` kwarg and see whether the problem is the page takes time to make the element clickable – Charchit Agarwal Jul 03 '22 at 10:19

1 Answers1

0

I have seen in some places where "id" is not enough for the click. You have to be specific in the selector if there's an anchor tag select up to that and give it a try.