Skip to content

Adding network.wait_for_idle options#47

Merged
excid3 merged 3 commits intoexcid3:mainfrom
higher-pixels:wait-for-idle-options
Feb 15, 2025
Merged

Adding network.wait_for_idle options#47
excid3 merged 3 commits intoexcid3:mainfrom
higher-pixels:wait-for-idle-options

Conversation

@ron-shinall
Copy link
Contributor

@ron-shinall ron-shinall commented Feb 15, 2025

@excid3 Thanks for this gem! I'm converting our application to use this, however, I ran into an issue that requires page.go_to(url) to call page.network.wait_for_idle to allow in-page JavaScript processing to finish. As such, I made a few changes and would appreciate your review, feedback, and consideration.

This PR:

  • Moves page.network.wait_for_idle outside the browser.create_page if...else block so that both cases can make use of it
  • Adds wait_for_idle_options named parameter to render_pdf to allow setting all of the available network.wait_for_idle options
  • Adds ensure with page.close to clean up network connections
  • Updates the Readme
  • And, since I was there, simplifies the authorize hash to **authorize in browser.create_page

@excid3 excid3 merged commit e8998d4 into excid3:main Feb 15, 2025
2 checks passed
@ron-shinall ron-shinall deleted the wait-for-idle-options branch February 15, 2025 22:07
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

Successfully merging this pull request may close these issues.

2 participants