-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
example for waiting for a form submit #438
Comments
Hi @tcurdt, that's a good idea for an example. Your commented out lines seem to be correct. Were they not doing what you expected? |
Sometimes paintingStable is what you want, other times you have a specific element (or many) you're waiting for. waitForElement would be appropriate in that latter case. |
I just wanted to double check but now I've run into some sessions trouble.
It seems like the I am also a little unsure whether I should use agent or the active tab. Another thing that I am wondering: for a form submit - I need to click the button? or is there a way to really submit the/a form? |
Is it possible that .results is on the page but not visible yet? You can pass in an option of waitForVisible if you're wanting it to be on the page, not just "existing". It's also usually good to double check that there's only a single result for that querySelector. That's an easy one to get tripped up on
agent is just a shortcut to your active tab. Same functionality.
It's going to be anything a user could do - hit entry, click the button, etc |
I got much further - but things are still a bit weird. Here is the full code:
The output of the results seems correct - but the browser on the left seems empty. |
By "Browser", do you mean the Replay UI? If so, you might have hit a bug in the reproduction of the page. You can tell by looking in the devtools console - it will tell you if you're looking at Replay. I'll see if I can reproduce in interim. Thanks for the snippet! |
I just tried myself. There's a bug reproducing the page. If you want to see the real browser (before I fix this), you can set an env var SA_SHOW_BROWSER=1. (or in code, process.env.SA_SHOW_BROWSER='1'); |
I was just trying to submit a form - but I haven't found any docs (missed?) or examples that wait for form submit.
What's the correct way to wait for the page to have loaded in this case?
The text was updated successfully, but these errors were encountered: